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

PowerBuilder 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

 

 

 

(PowerBuilder) OneNote - Get Page Metadata

Access a page's metadata by page identifier.

For more information, see https://docs.microsoft.com/en-us/graph/api/page-get?view=graph-rest-1.0

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Odata_context
string ls_Id
string ls_Self
string ls_CreatedDateTime
string ls_Title
string ls_CreatedByAppId
string ls_ContentUrl
string ls_LastModifiedDateTime
string ls_LinksOneNoteClientUrlHref
string ls_LinksOneNoteWebUrlHref
string ls_ParentSectionodata_context
string ls_ParentSectionId
string ls_ParentSectionDisplayName
string ls_ParentSectionSelf

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

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Implements the following CURL command:

// curl -X GET https://graph.microsoft.com/v1.0/me/onenote/pages/{id} \
//   -H 'authorization: Bearer ACCESS_TOKEN'

// Use the following online tool to generate HTTP code from a CURL command
// Convert a cURL Command to HTTP Source Code

// Adds the "Authorization: Bearer ACCESS_TOKEN" header.
loo_Http.AuthToken = "ACCESS_TOKEN"

loo_Http.SetUrlVar("page_id","0-d2298668edd74dccac7f821fa378bf64!41-3A33FCEB9B74CC15!20350")

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

li_Success = loo_Http.QuickGetSb("https://graph.microsoft.com/v1.0/me/onenote/pages/{$page_id}",loo_SbResponseBody)
if li_Success = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_SbResponseBody
    return
end if

loo_JResp = create oleobject
li_rc = loo_JResp.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Http.LastStatus
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Http.LastHeader
    Write-Debug "Failed."
    destroy loo_Http
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('admin%40chilkat.io')/onenote/pages/$entity",
//   "id": "0-d2298668edd74dccac7f821fa378bf64!41-3A33FCEB9B74CC15!20350",
//   "self": "https://graph.microsoft.com/v1.0/users/admin@chilkat.io/onenote/pages/0-d2298668edd74dccac7f821fa378bf64!41-3A33FCEB9B74CC15!20350",
//   "createdDateTime": "2020-10-23T12:00:44Z",
//   "title": "A page with rendered images and an attached file",
//   "createdByAppId": "WLID-00000000441C9990",
//   "contentUrl": "https://graph.microsoft.com/v1.0/users/admin@chilkat.io/onenote/pages/0-d2298668edd74dccac7f821fa378bf64!41-3A33FCEB9B74CC15!20350/content",
//   "lastModifiedDateTime": "2020-10-23T17:00:45.9018633Z",
//   "links": {
//     "oneNoteClientUrl": {
//       "href": "onenote:https://d.docs.live.net/3a33fceb9b74cc15/Documents/Testing%20Notebook/Ddd.one#A%20page%20with%20rendered%20images%20and%20an%20attached%20file&section-id=40f1bd0c-f32c-4f6a-8cc8-d0fc782f7064&page-id=2a8949ff-753a-45df-9a4c-f82743a7ebed&end"
//     },
//     "oneNoteWebUrl": {
//       "href": "https://onedrive.live.com/redir.aspx?cid=3a33fceb9b74cc15&page=edit&resid=3A33FCEB9B74CC15!20344&parId=3A33FCEB9B74CC15!187&wd=target%28Ddd.one%7C40f1bd0c-f32c-4f6a-8cc8-d0fc782f7064%2FA%20page%20with%20rendered%20images%20and%20an%20attached%20file%7C2a8949ff-753a-45df-9a4c-f82743a7ebed%2F%29"
//     }
//   },
//   "parentSection@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('admin%40chilkat.io')/onenote/pages('0-d2298668edd74dccac7f821fa378bf64%2141-3A33FCEB9B74CC15%2120350')/parentSection/$entity",
//   "parentSection": {
//     "id": "0-3A33FCEB9B74CC15!20350",
//     "displayName": "Ddd",
//     "self": "https://graph.microsoft.com/v1.0/users/admin@chilkat.io/onenote/sections/0-3A33FCEB9B74CC15!20350"
//   }
// }

// Sample code for parsing the JSON response...
// Use the following online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON

ls_Odata_context = loo_JResp.StringOf("\"@odata.context\"")
ls_Id = loo_JResp.StringOf("id")
ls_Self = loo_JResp.StringOf("self")
ls_CreatedDateTime = loo_JResp.StringOf("createdDateTime")
ls_Title = loo_JResp.StringOf("title")
ls_CreatedByAppId = loo_JResp.StringOf("createdByAppId")
ls_ContentUrl = loo_JResp.StringOf("contentUrl")
ls_LastModifiedDateTime = loo_JResp.StringOf("lastModifiedDateTime")
ls_LinksOneNoteClientUrlHref = loo_JResp.StringOf("links.oneNoteClientUrl.href")
ls_LinksOneNoteWebUrlHref = loo_JResp.StringOf("links.oneNoteWebUrl.href")
ls_ParentSectionodata_context = loo_JResp.StringOf("\"parentSection@odata.context\"")
ls_ParentSectionId = loo_JResp.StringOf("parentSection.id")
ls_ParentSectionDisplayName = loo_JResp.StringOf("parentSection.displayName")
ls_ParentSectionSelf = loo_JResp.StringOf("parentSection.self")


destroy loo_Http
destroy loo_SbResponseBody
destroy loo_JResp

 

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