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

Visual FoxPro 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

 

 

 

(Visual FoxPro) 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

LOCAL loJsonToken
LOCAL lnSuccess
LOCAL loOauth1
LOCAL loRest
LOCAL lnBAutoReconnect
LOCAL lcResponseBody
LOCAL loJson
LOCAL lcId
LOCAL lcName
LOCAL lcDesc
LOCAL lcDescData
LOCAL lnClosed
LOCAL lcIdOrganization
LOCAL lnPinned
LOCAL lcUrl
LOCAL lcShortUrl
LOCAL lcPrefsPermissionLevel
LOCAL lcPrefsVoting
LOCAL lcPrefsComments
LOCAL lcPrefsInvitations
LOCAL lnPrefsSelfJoin
LOCAL lnPrefsCardCovers
LOCAL lcPrefsCardAging
LOCAL lnPrefsCalendarFeedEnabled
LOCAL lcPrefsBackground
LOCAL lcPrefsBackgroundImage
LOCAL lcPrefsBackgroundImageScaled
LOCAL lnPrefsBackgroundTile
LOCAL lcPrefsBackgroundBrightness
LOCAL lcPrefsBackgroundColor
LOCAL lcPrefsBackgroundBottomColor
LOCAL lcPrefsBackgroundTopColor
LOCAL lnPrefsCanBePublic
LOCAL lnPrefsCanBeEnterprise
LOCAL lnPrefsCanBeOrg
LOCAL lnPrefsCanBePrivate
LOCAL lnPrefsCanInvite
LOCAL lcLabelNamesGreen
LOCAL lcLabelNamesYellow
LOCAL lcLabelNamesOrange
LOCAL lcLabelNamesRed
LOCAL lcLabelNamesPurple
LOCAL lcLabelNamesBlue
LOCAL lcLabelNamesSky
LOCAL lcLabelNamesLime
LOCAL lcLabelNamesPink
LOCAL lcLabelNamesBlack

* 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.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJsonToken = CreateObject('Chilkat.JsonObject')
lnSuccess = loJsonToken.LoadFile("qa_data/tokens/trello.json")

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.OAuth1')
loOauth1 = CreateObject('Chilkat.OAuth1')
loOauth1.ConsumerKey = "TRELLO_CONSUMER_KEY"
loOauth1.ConsumerSecret = "TRELLO_CONSUMER_SECRET"
loOauth1.Token = loJsonToken.StringOf("oauth_token")
loOauth1.TokenSecret = loJsonToken.StringOf("oauth_token_secret")

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Rest')
loRest = CreateObject('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.
lnBAutoReconnect = 1
lnSuccess = loRest.Connect("api.trello.com",443,1,lnBAutoReconnect)
IF (lnSuccess <> 1) THEN
    ? loRest.LastErrorText
    RELEASE loJsonToken
    RELEASE loOauth1
    RELEASE loRest
    CANCEL
ENDIF

loRest.SetAuthOAuth1(loOauth1,0)

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

loRest.AddHeader("Accept","application/json")

lcResponseBody = loRest.FullRequestFormUrlEncoded("POST","/1/boards")
IF (loRest.LastMethodSuccess <> 1) THEN
    ? loRest.LastErrorText
    RELEASE loJsonToken
    RELEASE loOauth1
    RELEASE loRest
    CANCEL
ENDIF

* We should expect a 200 response if successful.
IF (loRest.ResponseStatusCode <> 200) THEN
    ? "Request Header: "
    ? loRest.LastRequestHeader
    ? "----"
    ? "Response StatusCode = " + STR(loRest.ResponseStatusCode)
    ? "Response StatusLine: " + loRest.ResponseStatusText
    ? "Response Header:"
    ? loRest.ResponseHeader
    ? lcResponseBody
    RELEASE loJsonToken
    RELEASE loOauth1
    RELEASE loRest
    CANCEL
ENDIF

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')
loJson.Load(lcResponseBody)
loJson.EmitCompact = 0
? loJson.Emit()
? "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": {}
* }

lcId = loJson.StringOf("id")
lcName = loJson.StringOf("name")
lcDesc = loJson.StringOf("desc")
lcDescData = loJson.StringOf("descData")
lnClosed = loJson.BoolOf("closed")
lcIdOrganization = loJson.StringOf("idOrganization")
lnPinned = loJson.BoolOf("pinned")
lcUrl = loJson.StringOf("url")
lcShortUrl = loJson.StringOf("shortUrl")
lcPrefsPermissionLevel = loJson.StringOf("prefs.permissionLevel")
lcPrefsVoting = loJson.StringOf("prefs.voting")
lcPrefsComments = loJson.StringOf("prefs.comments")
lcPrefsInvitations = loJson.StringOf("prefs.invitations")
lnPrefsSelfJoin = loJson.BoolOf("prefs.selfJoin")
lnPrefsCardCovers = loJson.BoolOf("prefs.cardCovers")
lcPrefsCardAging = loJson.StringOf("prefs.cardAging")
lnPrefsCalendarFeedEnabled = loJson.BoolOf("prefs.calendarFeedEnabled")
lcPrefsBackground = loJson.StringOf("prefs.background")
lcPrefsBackgroundImage = loJson.StringOf("prefs.backgroundImage")
lcPrefsBackgroundImageScaled = loJson.StringOf("prefs.backgroundImageScaled")
lnPrefsBackgroundTile = loJson.BoolOf("prefs.backgroundTile")
lcPrefsBackgroundBrightness = loJson.StringOf("prefs.backgroundBrightness")
lcPrefsBackgroundColor = loJson.StringOf("prefs.backgroundColor")
lcPrefsBackgroundBottomColor = loJson.StringOf("prefs.backgroundBottomColor")
lcPrefsBackgroundTopColor = loJson.StringOf("prefs.backgroundTopColor")
lnPrefsCanBePublic = loJson.BoolOf("prefs.canBePublic")
lnPrefsCanBeEnterprise = loJson.BoolOf("prefs.canBeEnterprise")
lnPrefsCanBeOrg = loJson.BoolOf("prefs.canBeOrg")
lnPrefsCanBePrivate = loJson.BoolOf("prefs.canBePrivate")
lnPrefsCanInvite = loJson.BoolOf("prefs.canInvite")
lcLabelNamesGreen = loJson.StringOf("labelNames.green")
lcLabelNamesYellow = loJson.StringOf("labelNames.yellow")
lcLabelNamesOrange = loJson.StringOf("labelNames.orange")
lcLabelNamesRed = loJson.StringOf("labelNames.red")
lcLabelNamesPurple = loJson.StringOf("labelNames.purple")
lcLabelNamesBlue = loJson.StringOf("labelNames.blue")
lcLabelNamesSky = loJson.StringOf("labelNames.sky")
lcLabelNamesLime = loJson.StringOf("labelNames.lime")
lcLabelNamesPink = loJson.StringOf("labelNames.pink")
lcLabelNamesBlack = loJson.StringOf("labelNames.black")

RELEASE loJsonToken
RELEASE loOauth1
RELEASE loRest
RELEASE loJson


 

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