Instantly share code, notes, and snippets.
emartinezgh /CompleteDiscordQuest.md
CreatedJune 5, 2025 17:12 — forked fromaamiaa/CompleteDiscordQuest.md
Complete Recent Discord Questemartinezgh /CopyAsanaTasks.php
CreatedAugust 1, 2013 15:59 — forked frommhdhejazi/CopyAsanaTasks.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| functionasanaRequest($methodPath,$httpMethod='GET',$body=null) | |
| { | |
| $apiKey='ASANA_API_KEY_HERE';/// Get it from http://app.asana.com/-/account_api | |
| $url="https://app.asana.com/api/1.0/$methodPath"; | |
| $ch=curl_init(); | |
| curl_setopt($ch,CURLOPT_URL,$url); | |
| curl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_BASIC ) ; | |
| curl_setopt($ch,CURLOPT_USERPWD,$apiKey); | |
| curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); |