Orbit API helper library for Ruby.
This client can create, read, update and delete activities in your Orbit workspace.
To install this integration in a standalone app, add the gem to your Gemfile:
gem "orbit_activities"Then, run bundle install from your terminal.
To create an activity:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "new_activity",
body: # The custom activity object in JSON format, see Orbit API docs for reference
)You can inspect the Orbit API response by appending .response to the end of the initialization method.
To update an activity:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "update_activity",
activity_id: # The ID of the activity to be updated,
member_id: # The ID of the member the activity is attached to,
body: # The custom activity object in JSON format, see Orbit API docs for reference
)You can inspect the Orbit API response by appending .response to the end of the initialization method.
To delete an activity:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "delete_activity",
activity_id: # The ID of the activity to be updated,
member_id: # The ID of the member the activity is attached to
)You can inspect the Orbit API response by appending .response to the end of the initialization method.
To list activities:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "list_activities",
filters: # Any filters on the request in JSON format, see Orbit API docs for reference
).responseTo get a specific activity:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "get_activity",
activity_id: # The ID of the actiivity
).responseTo get activities associated with a specific member:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "list_member_activities",
activity_id: # The ID of the actiivity,
member_id: # The ID of the member,
filters: # Any filters on the request in JSON format, see Orbit API docs for reference
).responseTo get the latest activity timestamp for a specific activity type:
OrbitActivities::Request.new(
api_key: # Your Orbit API key,
workspace_id: # Your Orbit workspace ID,
action: "latest_activity_timestamp",
filters: { activity_type: # Activity type to search for, e.g. "custom:linkedin:comment" }
).responseFor details on the data structures the Orbit API expects, refer to the Orbit API Documentation.
We 💜 contributions from everyone! Check out the Contributing Guidelines for more information.
This is available as open source under the terms of the MIT License.
This project uses the Contributor Code of Conduct. We ask everyone to please adhere by its guidelines.
