Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

DataFlex Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(DataFlex) Frame.io - Create a Folder

Create a folder asset as a child to the root_asset_id.

For more information, see https://docs.frame.io/docs/root-asset-ids

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vJson
    Handle hoJson
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sTeam_id
    Integer iPublic_item_count
    String sProperties
    String sDeleted_at
    String sFps
    String sRating
    String sDescription
    String sUpdated_at
    String sCover_asset_id
    String sArchive_scheduled_at
    String sSubtitle_tracks
    String sIndex
    Integer iItem_count
    String sAccount_id
    String sName
    String sChecksums
    String sAudio_tracks
    String sDuration
    String sLabel
    Boolean iIs_session_watermarked
    String sParent_id
    Integer iVersions
    String sProject_id
    String sResource_id
    Boolean iV_private
    Integer iFrames
    String sAutoversion_id
    String sV_type
    String sUploaded_at
    String sCreator_id
    Boolean iUser_permissionsCan_download
    Boolean iUser_permissionsCan_modify_template
    Boolean iUser_permissionsCan_public_share_presentation
    Boolean iUser_permissionsCan_public_share_review_link
    Boolean iUser_permissionsCan_share_downloadable_presentation
    Boolean iUser_permissionsCan_share_downloadable_review_link
    Boolean iUser_permissionsCan_share_unwatermarked_presentation
    Boolean iUser_permissionsCan_share_unwatermarked_review_link
    Boolean iShared
    Boolean iIs_360
    Integer iComment_count
    String sArchived_at
    String sFiletype
    String sId
    String sHard_deleted_at
    Boolean iCopy
    Boolean iIs_hls_required
    String sArchive_status
    String sInserted_at
    Integer iFilesize
    String sTemp1
    Boolean bTemp1

    // 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 --request POST \
    // --url https://api.frame.io/v2/assets/<root_asset_id>/children \
    // --header 'authorization: Bearer <FRAME_IO_DEV_TOKEN>' \
    // --header 'content-type: application/json' \
    // --data '{"type":"folder", "name": "Folder at root"}'

    // Use the following online tool to generate HTTP code from a CURL command
    // Convert a cURL Command to HTTP Source Code

    // Use this online tool to generate code from sample JSON:
    // Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "type": "folder",
    //   "name": "Folder at root"
    // }

    Get Create (RefClass(cComChilkatJsonObject)) To hoJson
    If (Not(IsComObjectCreated(hoJson))) Begin
        Send CreateComObject of hoJson
    End
    Get ComUpdateString Of hoJson "type" "folder" To iSuccess
    Get ComUpdateString Of hoJson "name" "Folder at root" To iSuccess

    Send ComSetRequestHeader To hoHttp "content-type" "application/json"
    // Adds the "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" header.
    Set ComAuthToken Of hoHttp To "<FRAME_IO_DEV_TOKEN>"

    // Our root_asset_id = 4ecb383f-71a8-4233-b665-d8f75136f554
    // You'll need to modify the following line to use your root asset ID.

    Get pvComObject of hoJson to vJson
    Get ComPostJson3 Of hoHttp "https://api.frame.io/v2/assets/4ecb383f-71a8-4233-b665-d8f75136f554/children" "application/json" vJson To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess
    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 ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "team_id": "95a5fbad-688d-46fc-aef1-2f011dd76c10",
    //   "public_item_count": 0,
    //   "properties": null,
    //   "deleted_at": null,
    //   "fps": null,
    //   "rating": null,
    //   "description": null,
    //   "updated_at": "2020-08-18T03:31:59.699011Z",
    //   "cover_asset_id": null,
    //   "archive_scheduled_at": null,
    //   "subtitle_tracks": null,
    //   "index": -7.0,
    //   "item_count": 0,
    //   "account_id": "b1cd046b-a3bf-4ef8-81a6-0afd74ecc455",
    //   "name": "FolderA",
    //   "checksums": null,
    //   "audio_tracks": null,
    //   "duration": null,
    //   "label": "none",
    //   "is_session_watermarked": false,
    //   "parent_id": "4ecb383f-71a8-4233-b665-d8f75136f554",
    //   "versions": 0,
    //   "project_id": "e76653c4-6cc0-4c47-936b-f7885b477dc0",
    //   "resource_id": null,
    //   "private": false,
    //   "frames": 0,
    //   "autoversion_id": null,
    //   "type": "folder",
    //   "uploaded_at": "2020-08-18T03:31:59.697174Z",
    //   "creator_id": "34b4f98a-7cc9-4159-8f46-c7c3d837fc6f",
    //   "user_permissions": {
    //     "can_download": true,
    //     "can_modify_template": false,
    //     "can_public_share_presentation": true,
    //     "can_public_share_review_link": true,
    //     "can_share_downloadable_presentation": true,
    //     "can_share_downloadable_review_link": true,
    //     "can_share_unwatermarked_presentation": true,
    //     "can_share_unwatermarked_review_link": true
    //   },
    //   "shared": false,
    //   "is_360": false,
    //   "_type": "folder",
    //   "comment_count": 0,
    //   "archived_at": null,
    //   "filetype": null,
    //   "id": "039845e8-bffe-4d6b-88d3-c780bae06342",
    //   "hard_deleted_at": null,
    //   "copy": false,
    //   "is_hls_required": false,
    //   "archive_status": null,
    //   "inserted_at": "2020-08-18T03:31:59.699011Z",
    //   "filesize": 0
    // }

    // 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 "team_id" To sTeam_id
    Get ComIntOf Of hoJResp "public_item_count" To iPublic_item_count
    Get ComStringOf Of hoJResp "properties" To sProperties
    Get ComStringOf Of hoJResp "deleted_at" To sDeleted_at
    Get ComStringOf Of hoJResp "fps" To sFps
    Get ComStringOf Of hoJResp "rating" To sRating
    Get ComStringOf Of hoJResp "description" To sDescription
    Get ComStringOf Of hoJResp "updated_at" To sUpdated_at
    Get ComStringOf Of hoJResp "cover_asset_id" To sCover_asset_id
    Get ComStringOf Of hoJResp "archive_scheduled_at" To sArchive_scheduled_at
    Get ComStringOf Of hoJResp "subtitle_tracks" To sSubtitle_tracks
    Get ComStringOf Of hoJResp "index" To sIndex
    Get ComIntOf Of hoJResp "item_count" To iItem_count
    Get ComStringOf Of hoJResp "account_id" To sAccount_id
    Get ComStringOf Of hoJResp "name" To sName
    Get ComStringOf Of hoJResp "checksums" To sChecksums
    Get ComStringOf Of hoJResp "audio_tracks" To sAudio_tracks
    Get ComStringOf Of hoJResp "duration" To sDuration
    Get ComStringOf Of hoJResp "label" To sLabel
    Get ComBoolOf Of hoJResp "is_session_watermarked" To iIs_session_watermarked
    Get ComStringOf Of hoJResp "parent_id" To sParent_id
    Get ComIntOf Of hoJResp "versions" To iVersions
    Get ComStringOf Of hoJResp "project_id" To sProject_id
    Get ComStringOf Of hoJResp "resource_id" To sResource_id
    Get ComBoolOf Of hoJResp "private" To iV_private
    Get ComIntOf Of hoJResp "frames" To iFrames
    Get ComStringOf Of hoJResp "autoversion_id" To sAutoversion_id
    Get ComStringOf Of hoJResp "type" To sV_type
    Get ComStringOf Of hoJResp "uploaded_at" To sUploaded_at
    Get ComStringOf Of hoJResp "creator_id" To sCreator_id
    Get ComBoolOf Of hoJResp "user_permissions.can_download" To iUser_permissionsCan_download
    Get ComBoolOf Of hoJResp "user_permissions.can_modify_template" To iUser_permissionsCan_modify_template
    Get ComBoolOf Of hoJResp "user_permissions.can_public_share_presentation" To iUser_permissionsCan_public_share_presentation
    Get ComBoolOf Of hoJResp "user_permissions.can_public_share_review_link" To iUser_permissionsCan_public_share_review_link
    Get ComBoolOf Of hoJResp "user_permissions.can_share_downloadable_presentation" To iUser_permissionsCan_share_downloadable_presentation
    Get ComBoolOf Of hoJResp "user_permissions.can_share_downloadable_review_link" To iUser_permissionsCan_share_downloadable_review_link
    Get ComBoolOf Of hoJResp "user_permissions.can_share_unwatermarked_presentation" To iUser_permissionsCan_share_unwatermarked_presentation
    Get ComBoolOf Of hoJResp "user_permissions.can_share_unwatermarked_review_link" To iUser_permissionsCan_share_unwatermarked_review_link
    Get ComBoolOf Of hoJResp "shared" To iShared
    Get ComBoolOf Of hoJResp "is_360" To iIs_360
    Get ComStringOf Of hoJResp "_type" To sV_type
    Get ComIntOf Of hoJResp "comment_count" To iComment_count
    Get ComStringOf Of hoJResp "archived_at" To sArchived_at
    Get ComStringOf Of hoJResp "filetype" To sFiletype
    Get ComStringOf Of hoJResp "id" To sId
    Get ComStringOf Of hoJResp "hard_deleted_at" To sHard_deleted_at
    Get ComBoolOf Of hoJResp "copy" To iCopy
    Get ComBoolOf Of hoJResp "is_hls_required" To iIs_hls_required
    Get ComStringOf Of hoJResp "archive_status" To sArchive_status
    Get ComStringOf Of hoJResp "inserted_at" To sInserted_at
    Get ComIntOf Of hoJResp "filesize" To iFilesize


End_Procedure

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.