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

VBScript 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
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
Jira
Lightspeed
MYOB
Magento
Mailgun
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
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
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

 

 

 

(VBScript) 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

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

' 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.
set jsonToken = CreateObject("Chilkat_9_5_0.JsonObject")
success = jsonToken.LoadFile("qa_data/tokens/trello.json")

set oauth1 = CreateObject("Chilkat_9_5_0.OAuth1")
oauth1.ConsumerKey = "TRELLO_CONSUMER_KEY"
oauth1.ConsumerSecret = "TRELLO_CONSUMER_SECRET"
oauth1.Token = jsonToken.StringOf("oauth_token")
oauth1.TokenSecret = jsonToken.StringOf("oauth_token_secret")

set rest = CreateObject("Chilkat_9_5_0.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.
bAutoReconnect = 1
success = rest.Connect("api.trello.com",443,1,bAutoReconnect)
If (success <> 1) Then
    outFile.WriteLine(rest.LastErrorText)
    WScript.Quit
End If

success = rest.SetAuthOAuth1(oauth1,0)

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

success = rest.AddHeader("Accept","application/json")

responseBody = rest.FullRequestFormUrlEncoded("POST","/1/boards")
If (rest.LastMethodSuccess <> 1) Then
    outFile.WriteLine(rest.LastErrorText)
    WScript.Quit
End If

' We should expect a 200 response if successful.
If (rest.ResponseStatusCode <> 200) Then
    outFile.WriteLine("Request Header: ")
    outFile.WriteLine(rest.LastRequestHeader)
    outFile.WriteLine("----")
    outFile.WriteLine("Response StatusCode = " & rest.ResponseStatusCode)
    outFile.WriteLine("Response StatusLine: " & rest.ResponseStatusText)
    outFile.WriteLine("Response Header:")
    outFile.WriteLine(rest.ResponseHeader)
    outFile.WriteLine(responseBody)
    WScript.Quit
End If

set json = CreateObject("Chilkat_9_5_0.JsonObject")
success = json.Load(responseBody)
json.EmitCompact = 0
outFile.WriteLine(json.Emit())
outFile.WriteLine("Success.")

' 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": {}
' }

id = json.StringOf("id")
name = json.StringOf("name")
desc = json.StringOf("desc")
descData = json.StringOf("descData")
closed = json.BoolOf("closed")
idOrganization = json.StringOf("idOrganization")
pinned = json.BoolOf("pinned")
url = json.StringOf("url")
shortUrl = json.StringOf("shortUrl")
prefsPermissionLevel = json.StringOf("prefs.permissionLevel")
prefsVoting = json.StringOf("prefs.voting")
prefsComments = json.StringOf("prefs.comments")
prefsInvitations = json.StringOf("prefs.invitations")
prefsSelfJoin = json.BoolOf("prefs.selfJoin")
prefsCardCovers = json.BoolOf("prefs.cardCovers")
prefsCardAging = json.StringOf("prefs.cardAging")
prefsCalendarFeedEnabled = json.BoolOf("prefs.calendarFeedEnabled")
prefsBackground = json.StringOf("prefs.background")
prefsBackgroundImage = json.StringOf("prefs.backgroundImage")
prefsBackgroundImageScaled = json.StringOf("prefs.backgroundImageScaled")
prefsBackgroundTile = json.BoolOf("prefs.backgroundTile")
prefsBackgroundBrightness = json.StringOf("prefs.backgroundBrightness")
prefsBackgroundColor = json.StringOf("prefs.backgroundColor")
prefsBackgroundBottomColor = json.StringOf("prefs.backgroundBottomColor")
prefsBackgroundTopColor = json.StringOf("prefs.backgroundTopColor")
prefsCanBePublic = json.BoolOf("prefs.canBePublic")
prefsCanBeEnterprise = json.BoolOf("prefs.canBeEnterprise")
prefsCanBeOrg = json.BoolOf("prefs.canBeOrg")
prefsCanBePrivate = json.BoolOf("prefs.canBePrivate")
prefsCanInvite = json.BoolOf("prefs.canInvite")
labelNamesGreen = json.StringOf("labelNames.green")
labelNamesYellow = json.StringOf("labelNames.yellow")
labelNamesOrange = json.StringOf("labelNames.orange")
labelNamesRed = json.StringOf("labelNames.red")
labelNamesPurple = json.StringOf("labelNames.purple")
labelNamesBlue = json.StringOf("labelNames.blue")
labelNamesSky = json.StringOf("labelNames.sky")
labelNamesLime = json.StringOf("labelNames.lime")
labelNamesPink = json.StringOf("labelNames.pink")
labelNamesBlack = json.StringOf("labelNames.black")

outFile.Close

 

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