Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Visual FoxPro) Frame.io - Get Account IDMake a GET /me request if you don't have your Account ID on hand: For more information, see https://docs.frame.io/docs/root-asset-ids
LOCAL loHttp LOCAL lnSuccess LOCAL loSbResponseBody LOCAL loJResp LOCAL lnRespStatusCode LOCAL lcV_type LOCAL lcAccount_id LOCAL lcBio LOCAL lcContext LOCAL lcDeleted_at LOCAL lcDigest_frequency LOCAL lcEmail LOCAL lcEmail_confirm_by LOCAL lcEmail_preferences LOCAL lcFeatures_seen LOCAL lcFirst_login_at LOCAL lnFrom_google LOCAL lcId LOCAL lcImage_128 LOCAL lcImage_256 LOCAL lcImage_32 LOCAL lcImage_64 LOCAL lcInserted_at LOCAL lcJoined_via LOCAL lcLast_seen LOCAL lcLocation LOCAL lcName LOCAL lcNext_digest_date LOCAL lcPhone LOCAL lcProfile_image LOCAL lcProfile_image_original LOCAL lcRoles LOCAL lcTimezone_value LOCAL lcUpdated_at LOCAL lcUpload_url LOCAL lcUser_default_color LOCAL lcUser_hash * This example assumes the Chilkat API to have been previously unlocked. * See Global Unlock Sample for sample code. * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http') loHttp = CreateObject('Chilkat.Http') * Implements the following CURL command: * curl \ * -H "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" \ * https://api.frame.io/v2/me * Use the following online tool to generate HTTP code from a CURL command * Convert a cURL Command to HTTP Source Code * Adds the "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" header. loHttp.AuthToken = "<FRAME_IO_DEV_TOKEN>" * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder') loSbResponseBody = CreateObject('Chilkat.StringBuilder') lnSuccess = loHttp.QuickGetSb("https://api.frame.io/v2/me",loSbResponseBody) IF (lnSuccess = 0) THEN ? loHttp.LastErrorText RELEASE loHttp RELEASE loSbResponseBody CANCEL ENDIF * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject') loJResp = CreateObject('Chilkat.JsonObject') loJResp.LoadSb(loSbResponseBody) loJResp.EmitCompact = 0 ? "Response Body:" ? loJResp.Emit() lnRespStatusCode = loHttp.LastStatus ? "Response Status Code = " + STR(lnRespStatusCode) IF (lnRespStatusCode >= 400) THEN ? "Response Header:" ? loHttp.LastHeader ? "Failed." RELEASE loHttp RELEASE loSbResponseBody RELEASE loJResp CANCEL ENDIF * Sample JSON response: * (Sample code for parsing the JSON response is shown below) * { * "_type": "user", * "account_id": "b1cd046b-a3bf-4ef8-81a6-0afd74ecc455", * "bio": null, * "context": null, * "deleted_at": null, * "digest_frequency": "*/5 * * * *", * "email": "admin@chilkatsoft.com", * "email_confirm_by": null, * "email_preferences": null, * "features_seen": null, * "first_login_at": "2020-08-18T02:20:56.732000Z", * "from_google": false, * "id": "34b4f98a-7cc9-4159-8f46-c7c3d837fc6f", * "image_128": null, * "image_256": null, * "image_32": null, * "image_64": null, * "inserted_at": "2020-08-18T02:20:13.145929Z", * "joined_via": "organic", * "last_seen": "2020-08-18T02:20:52.852871Z", * "location": null, * "name": "Chilkat Software", * "next_digest_date": "2020-08-18T02:20:13.145828Z", * "phone": null, * "profile_image": "https://static-assets.frame.io/app/anon.jpg", * "profile_image_original": null, * "roles": null, * "timezone_value": "America/New_York", * "updated_at": "2020-08-18T02:20:56.950455Z", * "upload_url": "https://frameio-uploads-production.s3-accelerate.amazonaws.com/users/34b4f...cdcfe42b2e2f", * "user_default_color": "#ff40ff", * "user_hash": "1D39653455C86A85CA3D479C6D2ACE831211BC1B65770DF3747116DD320C3A00" * } * Sample code for parsing the JSON response... * Use the following online tool to generate parsing code from sample JSON: * Generate Parsing Code from JSON lcV_type = loJResp.StringOf("_type") lcAccount_id = loJResp.StringOf("account_id") lcBio = loJResp.StringOf("bio") lcContext = loJResp.StringOf("context") lcDeleted_at = loJResp.StringOf("deleted_at") lcDigest_frequency = loJResp.StringOf("digest_frequency") lcEmail = loJResp.StringOf("email") lcEmail_confirm_by = loJResp.StringOf("email_confirm_by") lcEmail_preferences = loJResp.StringOf("email_preferences") lcFeatures_seen = loJResp.StringOf("features_seen") lcFirst_login_at = loJResp.StringOf("first_login_at") lnFrom_google = loJResp.BoolOf("from_google") lcId = loJResp.StringOf("id") lcImage_128 = loJResp.StringOf("image_128") lcImage_256 = loJResp.StringOf("image_256") lcImage_32 = loJResp.StringOf("image_32") lcImage_64 = loJResp.StringOf("image_64") lcInserted_at = loJResp.StringOf("inserted_at") lcJoined_via = loJResp.StringOf("joined_via") lcLast_seen = loJResp.StringOf("last_seen") lcLocation = loJResp.StringOf("location") lcName = loJResp.StringOf("name") lcNext_digest_date = loJResp.StringOf("next_digest_date") lcPhone = loJResp.StringOf("phone") lcProfile_image = loJResp.StringOf("profile_image") lcProfile_image_original = loJResp.StringOf("profile_image_original") lcRoles = loJResp.StringOf("roles") lcTimezone_value = loJResp.StringOf("timezone_value") lcUpdated_at = loJResp.StringOf("updated_at") lcUpload_url = loJResp.StringOf("upload_url") lcUser_default_color = loJResp.StringOf("user_default_color") lcUser_hash = loJResp.StringOf("user_hash") RELEASE loHttp RELEASE loSbResponseBody RELEASE loJResp |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.