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

AutoIt 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

 

 

 

(AutoIt) Trello Create New Board

Create a new board.

For more information, see https://developers.trello.com/reference#boardsid

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

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

; curl --request POST \
;   --url 'https://api.trello.com/1/boards?name=name&defaultLabels=true&defaultLists=true&keepFromSource=none&prefs_permissionLevel=private
;           &prefs_voting=disabled&prefs_comments=members&prefs_invitations=members&prefs_selfJoin=true&prefs_cardCovers=true&prefs_background=blue&prefs_cardAging=regular'

; First get our previously obtained access token.
$oJsonToken = ObjCreate("Chilkat.JsonObject")
Local $bSuccess = $oJsonToken.LoadFile("qa_data/tokens/trello.json")

$oOauth1 = ObjCreate("Chilkat.OAuth1")
$oOauth1.ConsumerKey = "TRELLO_CONSUMER_KEY"
$oOauth1.ConsumerSecret = "TRELLO_CONSUMER_SECRET"
$oOauth1.Token = $oJsonToken.StringOf("oauth_token")
$oOauth1.TokenSecret = $oJsonToken.StringOf("oauth_token_secret")

$oRest = ObjCreate("Chilkat.Rest")

; Connect using TLS.
; A single REST object, once connected, can be used for many Trello REST API calls.
; The auto-reconnect indicates that if the already-established HTTPS connection is closed,
; then it will be automatically re-established as needed.
Local $bAutoReconnect = True
$bSuccess = $oRest.Connect("api.trello.com",443,True,$bAutoReconnect)
If ($bSuccess <> True) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

$oRest.SetAuthOAuth1($oOauth1,False)

$oRest.AddQueryParam("name","Football & Rugby")
$oRest.AddQueryParam("defaultLabels","true")
$oRest.AddQueryParam("defaultLists","true")
$oRest.AddQueryParam("keepFromSource","none")
$oRest.AddQueryParam("prefs_permissionLevel","private")
$oRest.AddQueryParam("prefs_voting","disabled")
$oRest.AddQueryParam("prefs_comments","members")
$oRest.AddQueryParam("prefs_invitations","members")
$oRest.AddQueryParam("prefs_selfJoin","true")
$oRest.AddQueryParam("prefs_cardCovers","true")
$oRest.AddQueryParam("prefs_background","blue")
$oRest.AddQueryParam("prefs_cardAging","regular")

$oRest.AddHeader("Accept","application/json")

Local $sResponseBody = $oRest.FullRequestFormUrlEncoded("POST","/1/boards")
If ($oRest.LastMethodSuccess <> True) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

; We should expect a 200 response if successful.
If ($oRest.ResponseStatusCode <> 200) Then
    ConsoleWrite("Request Header: " & @CRLF)
    ConsoleWrite($oRest.LastRequestHeader & @CRLF)
    ConsoleWrite("----" & @CRLF)
    ConsoleWrite("Response StatusCode = " & $oRest.ResponseStatusCode & @CRLF)
    ConsoleWrite("Response StatusLine: " & $oRest.ResponseStatusText & @CRLF)
    ConsoleWrite("Response Header:" & @CRLF)
    ConsoleWrite($oRest.ResponseHeader & @CRLF)
    ConsoleWrite($sResponseBody & @CRLF)
    Exit
EndIf

$oJson = ObjCreate("Chilkat.JsonObject")
$oJson.Load($sResponseBody)
$oJson.EmitCompact = False
ConsoleWrite($oJson.Emit() & @CRLF)
ConsoleWrite("Success." & @CRLF)

; A sample JSON response:
; (See the parsing code below...)
; Use this online tool to generate parsing code from sample JSON: 
; Generate Parsing Code from JSON

; 
; {
;   "id": "5cc606a1e2441a8a8fe3dc48",
;   "name": "Football",
;   "desc": "",
;   "descData": null,
;   "closed": false,
;   "idOrganization": null,
;   "pinned": false,
;   "url": "https://trello.com/b/eadpS1Pe/football",
;   "shortUrl": "https://trello.com/b/eadpS1Pe",
;   "prefs": {
;     "permissionLevel": "private",
;     "voting": "disabled",
;     "comments": "members",
;     "invitations": "members",
;     "selfJoin": true,
;     "cardCovers": true,
;     "cardAging": "regular",
;     "calendarFeedEnabled": false,
;     "background": "blue",
;     "backgroundImage": null,
;     "backgroundImageScaled": null,
;     "backgroundTile": false,
;     "backgroundBrightness": "dark",
;     "backgroundColor": "#0079BF",
;     "backgroundBottomColor": "#0079BF",
;     "backgroundTopColor": "#0079BF",
;     "canBePublic": true,
;     "canBeEnterprise": true,
;     "canBeOrg": true,
;     "canBePrivate": true,
;     "canInvite": true
;   },
;   "labelNames": {
;     "green": "",
;     "yellow": "",
;     "orange": "",
;     "red": "",
;     "purple": "",
;     "blue": "",
;     "sky": "",
;     "lime": "",
;     "pink": "",
;     "black": ""
;   },
;   "limits": {}
; }

Local $sId
Local $sName
Local $sDesc
Local $sDescData
Local $bClosed
Local $sIdOrganization
Local $bPinned
Local $sUrl
Local $shortUrl
Local $sPrefsPermissionLevel
Local $sPrefsVoting
Local $sPrefsComments
Local $sPrefsInvitations
Local $bPrefsSelfJoin
Local $bPrefsCardCovers
Local $sPrefsCardAging
Local $bPrefsCalendarFeedEnabled
Local $sPrefsBackground
Local $sPrefsBackgroundImage
Local $sPrefsBackgroundImageScaled
Local $bPrefsBackgroundTile
Local $sPrefsBackgroundBrightness
Local $sPrefsBackgroundColor
Local $sPrefsBackgroundBottomColor
Local $sPrefsBackgroundTopColor
Local $bPrefsCanBePublic
Local $bPrefsCanBeEnterprise
Local $bPrefsCanBeOrg
Local $bPrefsCanBePrivate
Local $bPrefsCanInvite
Local $sLabelNamesGreen
Local $sLabelNamesYellow
Local $sLabelNamesOrange
Local $sLabelNamesRed
Local $sLabelNamesPurple
Local $sLabelNamesBlue
Local $sLabelNamesSky
Local $sLabelNamesLime
Local $sLabelNamesPink
Local $sLabelNamesBlack

$sId = $oJson.StringOf("id")
$sName = $oJson.StringOf("name")
$sDesc = $oJson.StringOf("desc")
$sDescData = $oJson.StringOf("descData")
$bClosed = $oJson.BoolOf("closed")
$sIdOrganization = $oJson.StringOf("idOrganization")
$bPinned = $oJson.BoolOf("pinned")
$sUrl = $oJson.StringOf("url")
$shortUrl = $oJson.StringOf("shortUrl")
$sPrefsPermissionLevel = $oJson.StringOf("prefs.permissionLevel")
$sPrefsVoting = $oJson.StringOf("prefs.voting")
$sPrefsComments = $oJson.StringOf("prefs.comments")
$sPrefsInvitations = $oJson.StringOf("prefs.invitations")
$bPrefsSelfJoin = $oJson.BoolOf("prefs.selfJoin")
$bPrefsCardCovers = $oJson.BoolOf("prefs.cardCovers")
$sPrefsCardAging = $oJson.StringOf("prefs.cardAging")
$bPrefsCalendarFeedEnabled = $oJson.BoolOf("prefs.calendarFeedEnabled")
$sPrefsBackground = $oJson.StringOf("prefs.background")
$sPrefsBackgroundImage = $oJson.StringOf("prefs.backgroundImage")
$sPrefsBackgroundImageScaled = $oJson.StringOf("prefs.backgroundImageScaled")
$bPrefsBackgroundTile = $oJson.BoolOf("prefs.backgroundTile")
$sPrefsBackgroundBrightness = $oJson.StringOf("prefs.backgroundBrightness")
$sPrefsBackgroundColor = $oJson.StringOf("prefs.backgroundColor")
$sPrefsBackgroundBottomColor = $oJson.StringOf("prefs.backgroundBottomColor")
$sPrefsBackgroundTopColor = $oJson.StringOf("prefs.backgroundTopColor")
$bPrefsCanBePublic = $oJson.BoolOf("prefs.canBePublic")
$bPrefsCanBeEnterprise = $oJson.BoolOf("prefs.canBeEnterprise")
$bPrefsCanBeOrg = $oJson.BoolOf("prefs.canBeOrg")
$bPrefsCanBePrivate = $oJson.BoolOf("prefs.canBePrivate")
$bPrefsCanInvite = $oJson.BoolOf("prefs.canInvite")
$sLabelNamesGreen = $oJson.StringOf("labelNames.green")
$sLabelNamesYellow = $oJson.StringOf("labelNames.yellow")
$sLabelNamesOrange = $oJson.StringOf("labelNames.orange")
$sLabelNamesRed = $oJson.StringOf("labelNames.red")
$sLabelNamesPurple = $oJson.StringOf("labelNames.purple")
$sLabelNamesBlue = $oJson.StringOf("labelNames.blue")
$sLabelNamesSky = $oJson.StringOf("labelNames.sky")
$sLabelNamesLime = $oJson.StringOf("labelNames.lime")
$sLabelNamesPink = $oJson.StringOf("labelNames.pink")
$sLabelNamesBlack = $oJson.StringOf("labelNames.black")

 

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