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
(AutoIt) 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
; This example assumes the Chilkat API to have been previously unlocked. ; See Global Unlock Sample for sample code. $oHttp = ObjCreate("Chilkat.Http") Local $bSuccess ; 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. $oHttp.AuthToken = "<FRAME_IO_DEV_TOKEN>" $oSbResponseBody = ObjCreate("Chilkat.StringBuilder") $bSuccess = $oHttp.QuickGetSb("https://api.frame.io/v2/me",$oSbResponseBody) If ($bSuccess = False) Then ConsoleWrite($oHttp.LastErrorText & @CRLF) Exit EndIf $oJResp = ObjCreate("Chilkat.JsonObject") $oJResp.LoadSb($oSbResponseBody) $oJResp.EmitCompact = False ConsoleWrite("Response Body:" & @CRLF) ConsoleWrite($oJResp.Emit() & @CRLF) Local $iRespStatusCode = $oHttp.LastStatus ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF) If ($iRespStatusCode >= 400) Then ConsoleWrite("Response Header:" & @CRLF) ConsoleWrite($oHttp.LastHeader & @CRLF) ConsoleWrite("Failed." & @CRLF) Exit 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 Local $sV_type = $oJResp.StringOf("_type") Local $sAccount_id = $oJResp.StringOf("account_id") Local $sBio = $oJResp.StringOf("bio") Local $sContext = $oJResp.StringOf("context") Local $sDeleted_at = $oJResp.StringOf("deleted_at") Local $sDigest_frequency = $oJResp.StringOf("digest_frequency") Local $sEmail = $oJResp.StringOf("email") Local $sEmail_confirm_by = $oJResp.StringOf("email_confirm_by") Local $sEmail_preferences = $oJResp.StringOf("email_preferences") Local $sFeatures_seen = $oJResp.StringOf("features_seen") Local $sFirst_login_at = $oJResp.StringOf("first_login_at") Local $bFrom_google = $oJResp.BoolOf("from_google") Local $sId = $oJResp.StringOf("id") Local $sImage_128 = $oJResp.StringOf("image_128") Local $sImage_256 = $oJResp.StringOf("image_256") Local $sImage_32 = $oJResp.StringOf("image_32") Local $sImage_64 = $oJResp.StringOf("image_64") Local $sInserted_at = $oJResp.StringOf("inserted_at") Local $sJoined_via = $oJResp.StringOf("joined_via") Local $sLast_seen = $oJResp.StringOf("last_seen") Local $sLocation = $oJResp.StringOf("location") Local $sName = $oJResp.StringOf("name") Local $sNext_digest_date = $oJResp.StringOf("next_digest_date") Local $sPhone = $oJResp.StringOf("phone") Local $sProfile_image = $oJResp.StringOf("profile_image") Local $sProfile_image_original = $oJResp.StringOf("profile_image_original") Local $sRoles = $oJResp.StringOf("roles") Local $sTimezone_value = $oJResp.StringOf("timezone_value") Local $sUpdated_at = $oJResp.StringOf("updated_at") Local $sUpload_url = $oJResp.StringOf("upload_url") Local $sUser_default_color = $oJResp.StringOf("user_default_color") Local $sUser_hash = $oJResp.StringOf("user_hash") |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.