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
(DataFlex) 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
Use ChilkatAx-win32.pkg Procedure Test Handle hoHttp Boolean iSuccess Variant vSbResponseBody Handle hoSbResponseBody Handle hoJResp Integer iRespStatusCode String sV_type String sAccount_id String sBio String sContext String sDeleted_at String sDigest_frequency String sEmail String sEmail_confirm_by String sEmail_preferences String sFeatures_seen String sFirst_login_at Boolean iFrom_google String sId String sImage_128 String sImage_256 String sImage_32 String sImage_64 String sInserted_at String sJoined_via String sLast_seen String sLocation String sName String sNext_digest_date String sPhone String sProfile_image String sProfile_image_original String sRoles String sTimezone_value String sUpdated_at String sUpload_url String sUser_default_color String sUser_hash String sTemp1 // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End // 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. Set ComAuthToken Of hoHttp To "<FRAME_IO_DEV_TOKEN>" Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody If (Not(IsComObjectCreated(hoSbResponseBody))) Begin Send CreateComObject of hoSbResponseBody End Get pvComObject of hoSbResponseBody to vSbResponseBody Get ComQuickGetSb Of hoHttp "https://api.frame.io/v2/me" vSbResponseBody To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoHttp To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatJsonObject)) To hoJResp If (Not(IsComObjectCreated(hoJResp))) Begin Send CreateComObject of hoJResp End Get pvComObject of hoSbResponseBody to vSbResponseBody Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess Set ComEmitCompact Of hoJResp To False Showln "Response Body:" Get ComEmit Of hoJResp To sTemp1 Showln sTemp1 Get ComLastStatus Of hoHttp To iRespStatusCode Showln "Response Status Code = " iRespStatusCode If (iRespStatusCode >= 400) Begin Showln "Response Header:" Get ComLastHeader Of hoHttp To sTemp1 Showln sTemp1 Showln "Failed." Procedure_Return End // 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 Get ComStringOf Of hoJResp "_type" To sV_type Get ComStringOf Of hoJResp "account_id" To sAccount_id Get ComStringOf Of hoJResp "bio" To sBio Get ComStringOf Of hoJResp "context" To sContext Get ComStringOf Of hoJResp "deleted_at" To sDeleted_at Get ComStringOf Of hoJResp "digest_frequency" To sDigest_frequency Get ComStringOf Of hoJResp "email" To sEmail Get ComStringOf Of hoJResp "email_confirm_by" To sEmail_confirm_by Get ComStringOf Of hoJResp "email_preferences" To sEmail_preferences Get ComStringOf Of hoJResp "features_seen" To sFeatures_seen Get ComStringOf Of hoJResp "first_login_at" To sFirst_login_at Get ComBoolOf Of hoJResp "from_google" To iFrom_google Get ComStringOf Of hoJResp "id" To sId Get ComStringOf Of hoJResp "image_128" To sImage_128 Get ComStringOf Of hoJResp "image_256" To sImage_256 Get ComStringOf Of hoJResp "image_32" To sImage_32 Get ComStringOf Of hoJResp "image_64" To sImage_64 Get ComStringOf Of hoJResp "inserted_at" To sInserted_at Get ComStringOf Of hoJResp "joined_via" To sJoined_via Get ComStringOf Of hoJResp "last_seen" To sLast_seen Get ComStringOf Of hoJResp "location" To sLocation Get ComStringOf Of hoJResp "name" To sName Get ComStringOf Of hoJResp "next_digest_date" To sNext_digest_date Get ComStringOf Of hoJResp "phone" To sPhone Get ComStringOf Of hoJResp "profile_image" To sProfile_image Get ComStringOf Of hoJResp "profile_image_original" To sProfile_image_original Get ComStringOf Of hoJResp "roles" To sRoles Get ComStringOf Of hoJResp "timezone_value" To sTimezone_value Get ComStringOf Of hoJResp "updated_at" To sUpdated_at Get ComStringOf Of hoJResp "upload_url" To sUpload_url Get ComStringOf Of hoJResp "user_default_color" To sUser_default_color Get ComStringOf Of hoJResp "user_hash" To sUser_hash End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.