{"id":13744736,"url":"https://github.com/twalling/foursquare-as3","last_synced_at":"2025-05-09T03:33:15.133Z","repository":{"id":148479169,"uuid":"1481099","full_name":"twalling/foursquare-as3","owner":"twalling","description":"Actionscript 3 API for Foursquare","archived":true,"fork":false,"pushed_at":"2011-04-06T02:16:48.000Z","size":90,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T16:41:27.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twalling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-03-15T02:13:21.000Z","updated_at":"2023-01-28T01:00:32.000Z","dependencies_parsed_at":"2023-03-28T21:45:24.631Z","dependency_job_id":null,"html_url":"https://github.com/twalling/foursquare-as3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twalling%2Ffoursquare-as3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twalling%2Ffoursquare-as3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twalling%2Ffoursquare-as3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twalling%2Ffoursquare-as3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twalling","download_url":"https://codeload.github.com/twalling/foursquare-as3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253183283,"owners_count":21867394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:15.123Z","updated_at":"2025-05-09T03:33:14.916Z","avatar_url":"https://github.com/twalling.png","language":"ActionScript","funding_links":[],"categories":["API"],"sub_categories":["Other API"],"readme":"Introduction\n============\n\nThe foursquare API supports responses in either JSON or XML. The response format can be set on the service class and by default it's set to JSON. The service needs a base URL but its defaulted to http://api.foursquare.com/v1.\n\nCreate instance of service\n==========================\n\n    import com.timwalling.foursquare.FoursquareRequestFormat;\n    import com.timwalling.foursquare.FoursquareOperation;\n    import com.timwalling.foursquare.FoursquareService;\n    \n    var service:FoursquareService = new FoursquareService();\n    service.timeout = 20; // optional timeout, default is no timeout\n    service.format = FoursquareRequestFormat.XML; // optionally if you want XML instead of JSON\n\nCreate operation for the API call\n=================================\n\n    var operation:FoursquareOperation = service.findVenues(LAT, LONG);\n    operation.addEventListener(Event.COMPLETE, handleComplete);\n    operation.addEventListener(ErrorEvent.ERROR, handleError);\n    operation.execute();\n    \n    private function handleComplete(event:Event):void\n    {\n        trace(FoursquareOperation(event.target).data);\n    }\n                \n    private function handleError(event:ErrorEvent):void\n    {\n        trace(event.text);\n    }\n\nAccessing response data\n=======================\nSince JSON or XML can be returned you can access the data in different ways. If you use the default which is JSON then another actionscript library is required to decode the JSON string. as3corelib has some JSON classes and the library can be found here: http://code.google.com/p/as3corelib/.\n\nJSON example:\n\n    import com.adobe.serialization.json.JSON;\n    \n    var response:Object = JSON.decode(operation.data as String);\n\nIf XML is preferred, no 3rd party libraries are needed and the data can be accessed directly as XML.\n\nXML example:\n\n    var response:XML = operation.data as XML;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwalling%2Ffoursquare-as3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwalling%2Ffoursquare-as3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwalling%2Ffoursquare-as3/lists"}