Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Xojo Plugin Web API Examples

Primary Categories

AWS Translate
Activix CRM
Adyen
Amazon MWS
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Bluzone
CardConnect
ClickBank
Clickatell
Cloudfare
DocuSign
ETrade
Etsy
Facebook
GeoOp
GetHarvest
Jira
MYOB

Magento
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Okta OAuth/OIDC
OneLogin OIDC
PayPal
Peoplevox
Populi
QuickBooks
SOAP finkok.com
Shippo
Shopify
Stripe
SugarCRM
Trello
Twitter
VoiceBase
Vonage
Walmart
Walmart v3
Xero
eBay
effectconnect

 

 

 

(Xojo Plugin) Trello List Member Boards

Lists the boards that the user is a member of.

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

Chilkat Xojo Plugin Download

Xojo Plugin for Windows, Linux, Mac OS X, and ARM

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

// curl --request GET \
//   --url 'https://api.trello.com/1/members/{member_id}/boards?filter=all&fields=all&lists=none&memberships=none&organization=false&organization_fields=displayName'

// First get our previously obtained access token.
Dim jsonToken As New Chilkat.JsonObject
Dim success As Boolean
success = jsonToken.LoadFile("qa_data/tokens/trello.json")

Dim oauth1 As New Chilkat.OAuth1
oauth1.ConsumerKey = "TRELLO_CONSUMER_KEY"
oauth1.ConsumerSecret = "TRELLO_CONSUMER_SECRET"
oauth1.Token = jsonToken.StringOf("oauth_token")
oauth1.TokenSecret = jsonToken.StringOf("oauth_token_secret")

Dim rest As New 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.
Dim bAutoReconnect As Boolean
bAutoReconnect = True
success = rest.Connect("api.trello.com",443,True,bAutoReconnect)
If (success <> True) Then
    System.DebugLog(rest.LastErrorText)
    Return
End If

success = rest.SetAuthOAuth1(oauth1,False)

success = rest.AddQueryParam("filter","all")
success = rest.AddQueryParam("fields","all")
success = rest.AddQueryParam("lists","none")
success = rest.AddQueryParam("memberships","normal")
success = rest.AddQueryParam("organization","false")
success = rest.AddQueryParam("organization_fields","name,displayName")

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

Dim responseBody As String
responseBody = rest.FullRequestNoBody("GET","/1/members/member_id/boards")
If (rest.LastMethodSuccess <> True) Then
    System.DebugLog(rest.LastErrorText)
    Return
End If

// We should expect a 200 response if successful.
If (rest.ResponseStatusCode <> 200) Then
    System.DebugLog("Request Header: ")
    System.DebugLog(rest.LastRequestHeader)
    System.DebugLog("----")
    System.DebugLog("Response StatusCode = " + Str(rest.ResponseStatusCode))
    System.DebugLog("Response StatusLine: " + rest.ResponseStatusText)
    System.DebugLog("Response Header:")
    System.DebugLog(rest.ResponseHeader)
    System.DebugLog(responseBody)
    Return
End If

Dim jarr As New Chilkat.JsonArray
success = jarr.Load(responseBody)
jarr.EmitCompact = False
System.DebugLog(jarr.Emit())
System.DebugLog("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

// [
//   {
//     "name": "House Projects",
//     "desc": "",
//     "descData": null,
//     "closed": false,
//     "idOrganization": null,
//     "limits": null,
//     "pinned": null,
//     "shortLink": "j1hkQKKS",
//     "powerUps": [
//     ],
//     "dateLastActivity": null,
//     "idTags": [
//     ],
//     "datePluginDisable": null,
//     "creationMethod": null,
//     "ixUpdate": null,
//     "id": "5cc5fe862106bb8e05aa41e7",
//     "starred": false,
//     "url": "https://trello.com/b/j1hkQKKS/house-projects",
//     "prefs": {
//       "permissionLevel": "private",
//       "voting": "disabled",
//       "comments": "members",
//       "invitations": "members",
//       "selfJoin": false,
//       "cardCovers": true,
//       "cardAging": "regular",
//       "calendarFeedEnabled": false,
//       "background": "5cc344f6ba4cdc5f5cfc7d81",
//       "backgroundImage": "https://trello-backgrounds.s3.amazonaws.com/SharedBackground/2560x1709/4418c78f2f66d26932fef88aead2aff5/photo-1555985202-12975b0235dc",
//       "backgroundImageScaled": [
//         {
//           "width": 140,
//           "height": 93,
//           "url": "https://trello-backgrounds.s3.amazonaws.com/SharedBackground/140x93/0aebced0ac2d8c9c4b9231b1960d28c2/photo-1555985202-12975b0235dc.jpg"
//         },
//  ...
//         {
//           "width": 2560,
//           "height": 1709,
//           "url": "https://trello-backgrounds.s3.amazonaws.com/SharedBackground/2560x1709/4418c78f2f66d26932fef88aead2aff5/photo-1555985202-12975b0235dc"
//         }
//       ],
//       "backgroundTile": false,
//       "backgroundBrightness": "dark",
//       "backgroundBottomColor": "#412f23",
//       "backgroundTopColor": "#a99d97",
//       "canBePublic": true,
//       "canBeEnterprise": true,
//       "canBeOrg": true,
//       "canBePrivate": true,
//       "canInvite": true
//     },
//     "subscribed": false,
//     "labelNames": {
//       "green": "",
//       "yellow": "",
//       "orange": "",
//       "red": "",
//       "purple": "",
//       "blue": "",
//       "sky": "",
//       "lime": "",
//       "pink": "",
//       "black": ""
//     },
//     "dateLastView": "2019-04-28T19:28:18.159Z",
//     "shortUrl": "https://trello.com/b/j1hkQKKS",
//     "memberships": [
//       {
//         "id": "5cc5fe862106bb8e05aa41e8",
//         "idMember": "5cc5c74067d5215921ca7677",
//         "memberType": "admin",
//         "unconfirmed": false,
//         "deactivated": false
//       }
//     ]
//   },
//   {
//     "name": "Vacation Planning",
//     "desc": "",
//     "descData": null,
//     "closed": false,
//     "idOrganization": null,
//     "limits": null,
//     "pinned": null,
//     "shortLink": "QqIHvQyz",
//     "powerUps": [
//     ],
//     "dateLastActivity": "2019-04-28T15:32:20.134Z",
//     "idTags": [
//     ],
//     "datePluginDisable": null,
//     "creationMethod": "assisted",
//     "ixUpdate": null,
//     "id": "5cc5c783f5b10f8717a6b3d6",
//     "starred": false,
//     "url": "https://trello.com/b/QqIHvQyz/vacation-planning",
//     "prefs": {
//       "permissionLevel": "private",
//       "voting": "disabled",
//       "comments": "members",
//       "invitations": "members",
//       "selfJoin": true,
//       "cardCovers": true,
//       "cardAging": "regular",
//       "calendarFeedEnabled": false,
//       "background": "lime",
//       "backgroundImage": null,
//       "backgroundImageScaled": null,
//       "backgroundTile": false,
//       "backgroundBrightness": "dark",
//       "backgroundColor": "#4BBF6B",
//       "backgroundBottomColor": "#4BBF6B",
//       "backgroundTopColor": "#4BBF6B",
//       "canBePublic": true,
//       "canBeEnterprise": true,
//       "canBeOrg": true,
//       "canBePrivate": true,
//       "canInvite": true
//     },
//     "subscribed": false,
//     "labelNames": {
//       "green": "",
//       "yellow": "",
//       "orange": "",
//       "red": "",
//       "purple": "",
//       "blue": "",
//       "sky": "",
//       "lime": "",
//       "pink": "",
//       "black": ""
//     },
//     "dateLastView": "2019-04-28T19:32:21.009Z",
//     "shortUrl": "https://trello.com/b/QqIHvQyz",
//     "memberships": [
//       {
//         "id": "5cc5c783f5b10f8717a6b3d7",
//         "idMember": "5cc5c74067d5215921ca7677",
//         "memberType": "admin",
//         "unconfirmed": false,
//         "deactivated": false
//       }
//     ]
//   }
// ]

Dim i As Int32
Dim count_i As Int32
Dim json As Chilkat.JsonObject
Dim name As String
Dim desc As String
Dim descData As String
Dim closed As Boolean
Dim idOrganization As String
Dim limits As String
Dim pinned As String
Dim shortLink As String
Dim dateLastActivity As String
Dim datePluginDisable As String
Dim creationMethod As String
Dim ixUpdate As String
Dim id As String
Dim starred As Boolean
Dim url As String
Dim prefsPermissionLevel As String
Dim prefsVoting As String
Dim prefsComments As String
Dim prefsInvitations As String
Dim prefsSelfJoin As Boolean
Dim prefsCardCovers As Boolean
Dim prefsCardAging As String
Dim prefsCalendarFeedEnabled As Boolean
Dim prefsBackground As String
Dim prefsBackgroundImage As String
Dim prefsBackgroundTile As Boolean
Dim prefsBackgroundBrightness As String
Dim prefsBackgroundBottomColor As String
Dim prefsBackgroundTopColor As String
Dim prefsCanBePublic As Boolean
Dim prefsCanBeEnterprise As Boolean
Dim prefsCanBeOrg As Boolean
Dim prefsCanBePrivate As Boolean
Dim prefsCanInvite As Boolean
Dim subscribed As Boolean
Dim labelNamesGreen As String
Dim labelNamesYellow As String
Dim labelNamesOrange As String
Dim labelNamesRed As String
Dim labelNamesPurple As String
Dim labelNamesBlue As String
Dim labelNamesSky As String
Dim labelNamesLime As String
Dim labelNamesPink As String
Dim labelNamesBlack As String
Dim dateLastView As String
Dim shortUrl As String
Dim prefsBackgroundImageScaled As String
Dim prefsBackgroundColor As String
Dim j As Int32
Dim count_j As Int32
Dim width As Int32
Dim height As Int32
Dim idMember As String
Dim memberType As String
Dim unconfirmed As Boolean
Dim deactivated As Boolean

i = 0
count_i = jarr.Size
While i < count_i
    json = jarr.ObjectAt(i)
    name = json.StringOf("name")
    desc = json.StringOf("desc")
    descData = json.StringOf("descData")
    closed = json.BoolOf("closed")
    idOrganization = json.StringOf("idOrganization")
    limits = json.StringOf("limits")
    pinned = json.StringOf("pinned")
    shortLink = json.StringOf("shortLink")
    dateLastActivity = json.StringOf("dateLastActivity")
    datePluginDisable = json.StringOf("datePluginDisable")
    creationMethod = json.StringOf("creationMethod")
    ixUpdate = json.StringOf("ixUpdate")
    id = json.StringOf("id")
    starred = json.BoolOf("starred")
    url = json.StringOf("url")
    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")
    prefsBackgroundTile = json.BoolOf("prefs.backgroundTile")
    prefsBackgroundBrightness = json.StringOf("prefs.backgroundBrightness")
    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")
    subscribed = json.BoolOf("subscribed")
    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")
    dateLastView = json.StringOf("dateLastView")
    shortUrl = json.StringOf("shortUrl")
    prefsBackgroundImageScaled = json.StringOf("prefs.backgroundImageScaled")
    prefsBackgroundColor = json.StringOf("prefs.backgroundColor")
    j = 0
    count_j = json.SizeOfArray("powerUps")
    While j < count_j
        json.J = j
        // ...
        j = j + 1
    Wend
    j = 0
    count_j = json.SizeOfArray("idTags")
    While j < count_j
        json.J = j
        // ...
        j = j + 1
    Wend
    j = 0
    count_j = json.SizeOfArray("prefs.backgroundImageScaled")
    While j < count_j
        json.J = j
        width = json.IntOf("prefs.backgroundImageScaled[j].width")
        height = json.IntOf("prefs.backgroundImageScaled[j].height")
        url = json.StringOf("prefs.backgroundImageScaled[j].url")
        j = j + 1
    Wend
    j = 0
    count_j = json.SizeOfArray("memberships")
    While j < count_j
        json.J = j
        id = json.StringOf("memberships[j].id")
        idMember = json.StringOf("memberships[j].idMember")
        memberType = json.StringOf("memberships[j].memberType")
        unconfirmed = json.BoolOf("memberships[j].unconfirmed")
        deactivated = json.BoolOf("memberships[j].deactivated")
        j = j + 1
    Wend

    i = i + 1
Wend

 

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