Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(PowerBuilder) Trello List Member BoardsLists the boards that the user is a member of. For more information, see https://developers.trello.com/reference#membersidboards
integer li_rc oleobject loo_JsonToken integer li_Success oleobject loo_Oauth1 oleobject loo_Rest integer li_BAutoReconnect string ls_ResponseBody oleobject loo_Jarr integer i integer li_Count_i oleobject loo_Json string ls_Name string ls_Desc string ls_DescData integer li_Closed string ls_IdOrganization string ls_Limits string ls_Pinned string ls_ShortLink string ls_DateLastActivity string ls_DatePluginDisable string ls_CreationMethod string ls_IxUpdate string ls_Id integer li_Starred string ls_Url string ls_PrefsPermissionLevel string ls_PrefsVoting string ls_PrefsComments string ls_PrefsInvitations integer li_PrefsSelfJoin integer li_PrefsCardCovers string ls_PrefsCardAging integer li_PrefsCalendarFeedEnabled string ls_PrefsBackground string ls_PrefsBackgroundImage integer li_PrefsBackgroundTile string ls_PrefsBackgroundBrightness string ls_PrefsBackgroundBottomColor string ls_PrefsBackgroundTopColor integer li_PrefsCanBePublic integer li_PrefsCanBeEnterprise integer li_PrefsCanBeOrg integer li_PrefsCanBePrivate integer li_PrefsCanInvite integer li_Subscribed string ls_LabelNamesGreen string ls_LabelNamesYellow string ls_LabelNamesOrange string ls_LabelNamesRed string ls_LabelNamesPurple string ls_LabelNamesBlue string ls_LabelNamesSky string ls_LabelNamesLime string ls_LabelNamesPink string ls_LabelNamesBlack string ls_DateLastView string ls_ShortUrl string ls_PrefsBackgroundImageScaled string ls_PrefsBackgroundColor integer j integer li_Count_j integer li_Width integer li_Height string ls_IdMember string ls_MemberType integer li_Unconfirmed integer li_Deactivated // 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. loo_JsonToken = create oleobject // Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0 li_rc = loo_JsonToken.ConnectToNewObject("Chilkat.JsonObject") if li_rc < 0 then destroy loo_JsonToken MessageBox("Error","Connecting to COM object failed") return end if li_Success = loo_JsonToken.LoadFile("qa_data/tokens/trello.json") loo_Oauth1 = create oleobject // Use "Chilkat_9_5_0.OAuth1" for versions of Chilkat < 10.0.0 li_rc = loo_Oauth1.ConnectToNewObject("Chilkat.OAuth1") loo_Oauth1.ConsumerKey = "TRELLO_CONSUMER_KEY" loo_Oauth1.ConsumerSecret = "TRELLO_CONSUMER_SECRET" loo_Oauth1.Token = loo_JsonToken.StringOf("oauth_token") loo_Oauth1.TokenSecret = loo_JsonToken.StringOf("oauth_token_secret") loo_Rest = create oleobject // Use "Chilkat_9_5_0.Rest" for versions of Chilkat < 10.0.0 li_rc = loo_Rest.ConnectToNewObject("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. li_BAutoReconnect = 1 li_Success = loo_Rest.Connect("api.trello.com",443,1,li_BAutoReconnect) if li_Success <> 1 then Write-Debug loo_Rest.LastErrorText destroy loo_JsonToken destroy loo_Oauth1 destroy loo_Rest return end if loo_Rest.SetAuthOAuth1(loo_Oauth1,0) loo_Rest.AddQueryParam("filter","all") loo_Rest.AddQueryParam("fields","all") loo_Rest.AddQueryParam("lists","none") loo_Rest.AddQueryParam("memberships","normal") loo_Rest.AddQueryParam("organization","false") loo_Rest.AddQueryParam("organization_fields","name,displayName") loo_Rest.AddHeader("Accept","application/json") ls_ResponseBody = loo_Rest.FullRequestNoBody("GET","/1/members/member_id/boards") if loo_Rest.LastMethodSuccess <> 1 then Write-Debug loo_Rest.LastErrorText destroy loo_JsonToken destroy loo_Oauth1 destroy loo_Rest return end if // We should expect a 200 response if successful. if loo_Rest.ResponseStatusCode <> 200 then Write-Debug "Request Header: " Write-Debug loo_Rest.LastRequestHeader Write-Debug "----" Write-Debug "Response StatusCode = " + string(loo_Rest.ResponseStatusCode) Write-Debug "Response StatusLine: " + loo_Rest.ResponseStatusText Write-Debug "Response Header:" Write-Debug loo_Rest.ResponseHeader Write-Debug ls_ResponseBody destroy loo_JsonToken destroy loo_Oauth1 destroy loo_Rest return end if loo_Jarr = create oleobject // Use "Chilkat_9_5_0.JsonArray" for versions of Chilkat < 10.0.0 li_rc = loo_Jarr.ConnectToNewObject("Chilkat.JsonArray") loo_Jarr.Load(ls_ResponseBody) loo_Jarr.EmitCompact = 0 Write-Debug loo_Jarr.Emit() Write-Debug "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 // } // ] // } // ] i = 0 li_Count_i = loo_Jarr.Size do while i < li_Count_i loo_Json = loo_Jarr.ObjectAt(i) ls_Name = loo_Json.StringOf("name") ls_Desc = loo_Json.StringOf("desc") ls_DescData = loo_Json.StringOf("descData") li_Closed = loo_Json.BoolOf("closed") ls_IdOrganization = loo_Json.StringOf("idOrganization") ls_Limits = loo_Json.StringOf("limits") ls_Pinned = loo_Json.StringOf("pinned") ls_ShortLink = loo_Json.StringOf("shortLink") ls_DateLastActivity = loo_Json.StringOf("dateLastActivity") ls_DatePluginDisable = loo_Json.StringOf("datePluginDisable") ls_CreationMethod = loo_Json.StringOf("creationMethod") ls_IxUpdate = loo_Json.StringOf("ixUpdate") ls_Id = loo_Json.StringOf("id") li_Starred = loo_Json.BoolOf("starred") ls_Url = loo_Json.StringOf("url") ls_PrefsPermissionLevel = loo_Json.StringOf("prefs.permissionLevel") ls_PrefsVoting = loo_Json.StringOf("prefs.voting") ls_PrefsComments = loo_Json.StringOf("prefs.comments") ls_PrefsInvitations = loo_Json.StringOf("prefs.invitations") li_PrefsSelfJoin = loo_Json.BoolOf("prefs.selfJoin") li_PrefsCardCovers = loo_Json.BoolOf("prefs.cardCovers") ls_PrefsCardAging = loo_Json.StringOf("prefs.cardAging") li_PrefsCalendarFeedEnabled = loo_Json.BoolOf("prefs.calendarFeedEnabled") ls_PrefsBackground = loo_Json.StringOf("prefs.background") ls_PrefsBackgroundImage = loo_Json.StringOf("prefs.backgroundImage") li_PrefsBackgroundTile = loo_Json.BoolOf("prefs.backgroundTile") ls_PrefsBackgroundBrightness = loo_Json.StringOf("prefs.backgroundBrightness") ls_PrefsBackgroundBottomColor = loo_Json.StringOf("prefs.backgroundBottomColor") ls_PrefsBackgroundTopColor = loo_Json.StringOf("prefs.backgroundTopColor") li_PrefsCanBePublic = loo_Json.BoolOf("prefs.canBePublic") li_PrefsCanBeEnterprise = loo_Json.BoolOf("prefs.canBeEnterprise") li_PrefsCanBeOrg = loo_Json.BoolOf("prefs.canBeOrg") li_PrefsCanBePrivate = loo_Json.BoolOf("prefs.canBePrivate") li_PrefsCanInvite = loo_Json.BoolOf("prefs.canInvite") li_Subscribed = loo_Json.BoolOf("subscribed") ls_LabelNamesGreen = loo_Json.StringOf("labelNames.green") ls_LabelNamesYellow = loo_Json.StringOf("labelNames.yellow") ls_LabelNamesOrange = loo_Json.StringOf("labelNames.orange") ls_LabelNamesRed = loo_Json.StringOf("labelNames.red") ls_LabelNamesPurple = loo_Json.StringOf("labelNames.purple") ls_LabelNamesBlue = loo_Json.StringOf("labelNames.blue") ls_LabelNamesSky = loo_Json.StringOf("labelNames.sky") ls_LabelNamesLime = loo_Json.StringOf("labelNames.lime") ls_LabelNamesPink = loo_Json.StringOf("labelNames.pink") ls_LabelNamesBlack = loo_Json.StringOf("labelNames.black") ls_DateLastView = loo_Json.StringOf("dateLastView") ls_ShortUrl = loo_Json.StringOf("shortUrl") ls_PrefsBackgroundImageScaled = loo_Json.StringOf("prefs.backgroundImageScaled") ls_PrefsBackgroundColor = loo_Json.StringOf("prefs.backgroundColor") j = 0 li_Count_j = loo_Json.SizeOfArray("powerUps") do while j < li_Count_j loo_Json.J = j // ... j = j + 1 loop j = 0 li_Count_j = loo_Json.SizeOfArray("idTags") do while j < li_Count_j loo_Json.J = j // ... j = j + 1 loop j = 0 li_Count_j = loo_Json.SizeOfArray("prefs.backgroundImageScaled") do while j < li_Count_j loo_Json.J = j li_Width = loo_Json.IntOf("prefs.backgroundImageScaled[j].width") li_Height = loo_Json.IntOf("prefs.backgroundImageScaled[j].height") ls_Url = loo_Json.StringOf("prefs.backgroundImageScaled[j].url") j = j + 1 loop j = 0 li_Count_j = loo_Json.SizeOfArray("memberships") do while j < li_Count_j loo_Json.J = j ls_Id = loo_Json.StringOf("memberships[j].id") ls_IdMember = loo_Json.StringOf("memberships[j].idMember") ls_MemberType = loo_Json.StringOf("memberships[j].memberType") li_Unconfirmed = loo_Json.BoolOf("memberships[j].unconfirmed") li_Deactivated = loo_Json.BoolOf("memberships[j].deactivated") j = j + 1 loop destroy loo_Json i = i + 1 loop destroy loo_JsonToken destroy loo_Oauth1 destroy loo_Rest destroy loo_Jarr |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.