Modules@robinpath/calendly
calendly

@robinpath/calendly

0.1.2Node.jsPublic

Calendly module for RobinPath.

Calendly

Calendly module for RobinPath.

Package: @robinpath/calendly | Category: Utility | Type: Utility

Authentication

calendly.setCredentials "your-credentials"

Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.

Use Cases

Use the calendly module when you need to:

  • getCurrentUser -- Use calendly.getCurrentUser to perform this operation
  • listEventTypes -- Use calendly.listEventTypes to perform this operation
  • getEventType -- Use calendly.getEventType to perform this operation
  • listScheduledEvents -- Use calendly.listScheduledEvents to perform this operation
  • getScheduledEvent -- Use calendly.getScheduledEvent to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure calendly credentials.object
getCurrentUsergetCurrentUserobject
listEventTypeslistEventTypesobject
getEventTypegetEventTypeobject
listScheduledEventslistScheduledEventsobject
getScheduledEventgetScheduledEventobject
listEventInviteeslistEventInviteesobject
getEventInviteegetEventInviteeobject
cancelEventcancelEventobject
listWebhookslistWebhooksobject
createWebhookcreateWebhookobject
deleteWebhookdeleteWebhookobject
getOrganizationgetOrganizationobject

Functions

setCredentials

Configure calendly credentials.

Module: calendly | Returns: object -- API response.

calendly.setCredentials
ParameterTypeRequiredDescription
accessTokenstringYesaccessToken

getCurrentUser

getCurrentUser

Module: calendly | Returns: object -- API response.

calendly.getCurrentUser
ParameterTypeRequiredDescription
inputstringNoInput parameter

listEventTypes

listEventTypes

Module: calendly | Returns: object -- API response.

calendly.listEventTypes
ParameterTypeRequiredDescription
inputstringNoInput parameter

getEventType

getEventType

Module: calendly | Returns: object -- API response.

calendly.getEventType
ParameterTypeRequiredDescription
inputstringNoInput parameter

listScheduledEvents

listScheduledEvents

Module: calendly | Returns: object -- API response.

calendly.listScheduledEvents
ParameterTypeRequiredDescription
inputstringNoInput parameter

getScheduledEvent

getScheduledEvent

Module: calendly | Returns: object -- API response.

calendly.getScheduledEvent
ParameterTypeRequiredDescription
inputstringNoInput parameter

listEventInvitees

listEventInvitees

Module: calendly | Returns: object -- API response.

calendly.listEventInvitees
ParameterTypeRequiredDescription
inputstringNoInput parameter

getEventInvitee

getEventInvitee

Module: calendly | Returns: object -- API response.

calendly.getEventInvitee
ParameterTypeRequiredDescription
inputstringNoInput parameter

cancelEvent

cancelEvent

Module: calendly | Returns: object -- API response.

calendly.cancelEvent
ParameterTypeRequiredDescription
inputstringNoInput parameter

listWebhooks

listWebhooks

Module: calendly | Returns: object -- API response.

calendly.listWebhooks
ParameterTypeRequiredDescription
inputstringNoInput parameter

createWebhook

createWebhook

Module: calendly | Returns: object -- API response.

calendly.createWebhook
ParameterTypeRequiredDescription
inputstringNoInput parameter

deleteWebhook

deleteWebhook

Module: calendly | Returns: object -- API response.

calendly.deleteWebhook
ParameterTypeRequiredDescription
inputstringNoInput parameter

getOrganization

getOrganization

Module: calendly | Returns: object -- API response.

calendly.getOrganization
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
Calendly API error (${res.status}): ${t}Check the error message for details
calendly.setCredentials requires accessToken.Check the error message for details
calendly.cancelEvent requires an ID.Check the error message for details
calendly.deleteWebhook requires an ID.Check the error message for details
Calendly: "..." not configured. Call calendly.setCredentials first.Check the error message for details
@desc "Get current user and validate result"
do
  set $result as calendly.getCurrentUser
  if $result != null
    print "Success"
  else
    print "No result"
  end
enddo

Recipes

1. List and iterate CurrentUser

Retrieve all items and loop through them.

@desc "Setup authentication"
do
  calendly.setCredentials $token
enddo

@desc "Get current user and iterate results"
do
  set $result as calendly.getCurrentUser
  each $item in $result
    print $item
  end
enddo

2. Create a new item with createWebhook

Create a new resource and capture the result.

@desc "Setup authentication"
do
  calendly.setCredentials $token
enddo

@desc "Create webhook"
do
  set $result as calendly.createWebhook
  print "Created: " + $result
enddo

3. Check before creating

List existing items and only create if needed.

@desc "Setup authentication"
do
  calendly.setCredentials $token
enddo

@desc "Get current user and create webhook"
do
  set $existing as calendly.getCurrentUser
  if $existing == null
    calendly.createWebhook
    print "Item created"
  else
    print "Item already exists"
  end
enddo

4. Multi-step Calendly workflow

Chain multiple calendly operations together.

@desc "Setup authentication"
do
  calendly.setCredentials $token
enddo

@desc "Get current user, list event types, and more"
do
  set $r_getCurrentUser as calendly.getCurrentUser
  set $r_listEventTypes as calendly.listEventTypes
  set $r_getEventType as calendly.getEventType
  print "All operations complete"
enddo

5. Safe getCurrentUser with validation

Check results before proceeding.

@desc "Setup authentication"
do
  calendly.setCredentials $token
enddo

@desc "Get current user and validate result"
do
  set $result as calendly.getCurrentUser
  if $result != null
    print "Success: " + $result
  else
    print "Operation returned no data"
  end
enddo

Related Modules

  • json -- JSON module for complementary functionality

Versions (1)

VersionTagPublished
0.1.2latest1 months ago
Install
$ robinpath add @robinpath/calendly

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.2
LicenseMIT
Unpacked Size4.2 KB
Versions1
Weekly Downloads26
Total Downloads26
Stars0
Last Publish1 months ago
Created1 months ago

Category

utilities