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

Tcl 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

 

 

 

(Tcl) 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 Tcl Extension Downloads

Chilkat Tcl Extension Downloads

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

# 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"
# }

set json [new_CkJsonObject]

CkJsonObject_UpdateString $json "type" "folder"
CkJsonObject_UpdateString $json "name" "Folder at root"

CkHttp_SetRequestHeader $http "content-type" "application/json"
# Adds the "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" header.
CkHttp_put_AuthToken $http "<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.

# resp is a CkHttpResponse
set resp [CkHttp_PostJson3 $http "https://api.frame.io/v2/assets/4ecb383f-71a8-4233-b665-d8f75136f554/children" "application/json" $json]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkJsonObject $json
    exit
}

set sbResponseBody [new_CkStringBuilder]

CkHttpResponse_GetBodySb $resp $sbResponseBody
set jResp [new_CkJsonObject]

CkJsonObject_LoadSb $jResp $sbResponseBody
CkJsonObject_put_EmitCompact $jResp 0

puts "Response Body:"
puts [CkJsonObject_emit $jResp]

set respStatusCode [CkHttpResponse_get_StatusCode $resp]
puts "Response Status Code = $respStatusCode"
if {$respStatusCode >= 400} then {
    puts "Response Header:"
    puts [CkHttpResponse_header $resp]
    puts "Failed."
    delete_CkHttpResponse $resp

    delete_CkHttp $http
    delete_CkJsonObject $json
    delete_CkStringBuilder $sbResponseBody
    delete_CkJsonObject $jResp
    exit
}

delete_CkHttpResponse $resp

# 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

set team_id [CkJsonObject_stringOf $jResp "team_id"]
set public_item_count [CkJsonObject_IntOf $jResp "public_item_count"]
set properties [CkJsonObject_stringOf $jResp "properties"]
set deleted_at [CkJsonObject_stringOf $jResp "deleted_at"]
set fps [CkJsonObject_stringOf $jResp "fps"]
set rating [CkJsonObject_stringOf $jResp "rating"]
set description [CkJsonObject_stringOf $jResp "description"]
set updated_at [CkJsonObject_stringOf $jResp "updated_at"]
set cover_asset_id [CkJsonObject_stringOf $jResp "cover_asset_id"]
set archive_scheduled_at [CkJsonObject_stringOf $jResp "archive_scheduled_at"]
set subtitle_tracks [CkJsonObject_stringOf $jResp "subtitle_tracks"]
set index [CkJsonObject_stringOf $jResp "index"]
set item_count [CkJsonObject_IntOf $jResp "item_count"]
set account_id [CkJsonObject_stringOf $jResp "account_id"]
set name [CkJsonObject_stringOf $jResp "name"]
set checksums [CkJsonObject_stringOf $jResp "checksums"]
set audio_tracks [CkJsonObject_stringOf $jResp "audio_tracks"]
set duration [CkJsonObject_stringOf $jResp "duration"]
set label [CkJsonObject_stringOf $jResp "label"]
set is_session_watermarked [CkJsonObject_BoolOf $jResp "is_session_watermarked"]
set parent_id [CkJsonObject_stringOf $jResp "parent_id"]
set versions [CkJsonObject_IntOf $jResp "versions"]
set project_id [CkJsonObject_stringOf $jResp "project_id"]
set resource_id [CkJsonObject_stringOf $jResp "resource_id"]
set v_private [CkJsonObject_BoolOf $jResp "private"]
set frames [CkJsonObject_IntOf $jResp "frames"]
set autoversion_id [CkJsonObject_stringOf $jResp "autoversion_id"]
set v_type [CkJsonObject_stringOf $jResp "type"]
set uploaded_at [CkJsonObject_stringOf $jResp "uploaded_at"]
set creator_id [CkJsonObject_stringOf $jResp "creator_id"]
set user_permissionsCan_download [CkJsonObject_BoolOf $jResp "user_permissions.can_download"]
set user_permissionsCan_modify_template [CkJsonObject_BoolOf $jResp "user_permissions.can_modify_template"]
set user_permissionsCan_public_share_presentation [CkJsonObject_BoolOf $jResp "user_permissions.can_public_share_presentation"]
set user_permissionsCan_public_share_review_link [CkJsonObject_BoolOf $jResp "user_permissions.can_public_share_review_link"]
set user_permissionsCan_share_downloadable_presentation [CkJsonObject_BoolOf $jResp "user_permissions.can_share_downloadable_presentation"]
set user_permissionsCan_share_downloadable_review_link [CkJsonObject_BoolOf $jResp "user_permissions.can_share_downloadable_review_link"]
set user_permissionsCan_share_unwatermarked_presentation [CkJsonObject_BoolOf $jResp "user_permissions.can_share_unwatermarked_presentation"]
set user_permissionsCan_share_unwatermarked_review_link [CkJsonObject_BoolOf $jResp "user_permissions.can_share_unwatermarked_review_link"]
set shared [CkJsonObject_BoolOf $jResp "shared"]
set is_360 [CkJsonObject_BoolOf $jResp "is_360"]
set v_type [CkJsonObject_stringOf $jResp "_type"]
set comment_count [CkJsonObject_IntOf $jResp "comment_count"]
set archived_at [CkJsonObject_stringOf $jResp "archived_at"]
set filetype [CkJsonObject_stringOf $jResp "filetype"]
set id [CkJsonObject_stringOf $jResp "id"]
set hard_deleted_at [CkJsonObject_stringOf $jResp "hard_deleted_at"]
set copy [CkJsonObject_BoolOf $jResp "copy"]
set is_hls_required [CkJsonObject_BoolOf $jResp "is_hls_required"]
set archive_status [CkJsonObject_stringOf $jResp "archive_status"]
set inserted_at [CkJsonObject_stringOf $jResp "inserted_at"]
set filesize [CkJsonObject_IntOf $jResp "filesize"]

delete_CkHttp $http
delete_CkJsonObject $json
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp

 

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