@robinpath/apollo
0.1.2Node.jsPublicApollo module for RobinPath.
Apollo
Apollo module for RobinPath.
Package: @robinpath/apollo | Category: Utility | Type: Utility
Authentication
apollo.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 apollo module when you need to:
- searchPeople -- Use
apollo.searchPeopleto perform this operation - getPerson -- Use
apollo.getPersonto perform this operation - enrichPerson -- Use
apollo.enrichPersonto perform this operation - searchOrganizations -- Use
apollo.searchOrganizationsto perform this operation - getOrganization -- Use
apollo.getOrganizationto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure apollo credentials. | object |
searchPeople | searchPeople | object |
getPerson | getPerson | object |
enrichPerson | enrichPerson | object |
searchOrganizations | searchOrganizations | object |
getOrganization | getOrganization | object |
enrichOrganization | enrichOrganization | object |
listSequences | listSequences | object |
getSequence | getSequence | object |
addToSequence | addToSequence | object |
listEmailAccounts | listEmailAccounts | object |
searchContacts | searchContacts | object |
createContact | createContact | object |
updateContact | updateContact | object |
listLists | listLists | object |
addToList | addToList | object |
listTasks | listTasks | object |
createTask | createTask | object |
getAccount | getAccount | object |
Functions
setCredentials
Configure apollo credentials.
Module: apollo | Returns: object -- API response.
apollo.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | apiKey |
searchPeople
searchPeople
Module: apollo | Returns: object -- API response.
apollo.searchPeople
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getPerson
getPerson
Module: apollo | Returns: object -- API response.
apollo.getPerson
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
enrichPerson
enrichPerson
Module: apollo | Returns: object -- API response.
apollo.enrichPerson
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
searchOrganizations
searchOrganizations
Module: apollo | Returns: object -- API response.
apollo.searchOrganizations
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getOrganization
getOrganization
Module: apollo | Returns: object -- API response.
apollo.getOrganization
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
enrichOrganization
enrichOrganization
Module: apollo | Returns: object -- API response.
apollo.enrichOrganization
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listSequences
listSequences
Module: apollo | Returns: object -- API response.
apollo.listSequences
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getSequence
getSequence
Module: apollo | Returns: object -- API response.
apollo.getSequence
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
addToSequence
addToSequence
Module: apollo | Returns: object -- API response.
apollo.addToSequence
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listEmailAccounts
listEmailAccounts
Module: apollo | Returns: object -- API response.
apollo.listEmailAccounts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
searchContacts
searchContacts
Module: apollo | Returns: object -- API response.
apollo.searchContacts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createContact
createContact
Module: apollo | Returns: object -- API response.
apollo.createContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateContact
updateContact
Module: apollo | Returns: object -- API response.
apollo.updateContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listLists
listLists
Module: apollo | Returns: object -- API response.
apollo.listLists
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
addToList
addToList
Module: apollo | Returns: object -- API response.
apollo.addToList
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTasks
listTasks
Module: apollo | Returns: object -- API response.
apollo.listTasks
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createTask
createTask
Module: apollo | Returns: object -- API response.
apollo.createTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getAccount
getAccount
Module: apollo | Returns: object -- API response.
apollo.getAccount
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Apollo API error (${res.status}): ${t} | Check the error message for details |
apollo.setCredentials requires apiKey. | Check the error message for details |
apollo.updateContact requires an ID. | Check the error message for details |
Apollo: "..." not configured. Call apollo.setCredentials first. | Check the error message for details |
@desc "Search people and validate result"
do
set $result as apollo.searchPeople
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Person
Retrieve all items and loop through them.
@desc "Setup authentication"
do
apollo.setCredentials $token
enddo
@desc "Get person and iterate results"
do
set $result as apollo.getPerson
each $item in $result
print $item
end
enddo
2. Create a new item with addToSequence
Create a new resource and capture the result.
@desc "Setup authentication"
do
apollo.setCredentials $token
enddo
@desc "Add to sequence"
do
set $result as apollo.addToSequence
print "Created: " + $result
enddo
3. Create and update workflow
Create an item and then update it.
@desc "Setup authentication"
do
apollo.setCredentials $token
enddo
@desc "Add to sequence and update contact"
do
set $created as apollo.addToSequence
# Update the created item
apollo.updateContact
enddo
4. Check before creating
List existing items and only create if needed.
@desc "Setup authentication"
do
apollo.setCredentials $token
enddo
@desc "Get person and add to sequence"
do
set $existing as apollo.getPerson
if $existing == null
apollo.addToSequence
print "Item created"
else
print "Item already exists"
end
enddo
5. Multi-step Apollo workflow
Chain multiple apollo operations together.
@desc "Setup authentication"
do
apollo.setCredentials $token
enddo
@desc "Search people, get person, and more"
do
set $r_searchPeople as apollo.searchPeople
set $r_getPerson as apollo.getPerson
set $r_enrichPerson as apollo.enrichPerson
print "All operations complete"
enddo
6. Safe searchPeople with validation
Check results before proceeding.
@desc "Setup authentication"
do
apollo.setCredentials $token
enddo
@desc "Search people and validate result"
do
set $result as apollo.searchPeople
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- json -- JSON module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.2 | latest | 1 months ago |
Related Modules
@robinpathv0.1.4
SMTP email sending and address parsing for RobinPath
hash
JS@robinpathv0.1.3
Cryptographic hashing utilities: MD5, SHA family, HMAC, CRC32, file hashing, UUID v5 generation, secure random bytes, and content fingerprinting
csv
JS@robinpathv0.1.2
Parse and stringify CSV data
archive
JS@robinpathv0.1.5
Create and extract .zip and .tar.gz file archives
$ robinpath add @robinpath/apollo
