Skip to content

Repository files navigation

cortex-client-ruby

Build StatusGem Version

Ruby client library for cortex's API.

Constructor

require'cortex-client'client=Cortex::Client.new(access_token: 'access_token')client.posts.query().eachdo |post|
putspostend

Alternatively, cortex-client will handle OAuth2 authentication for you:

require'cortex-client'client=Cortex::Client.new(key: 'my-app-id',secret: 'my-app-secret',base_url: 'base_url',scopes: 'view:posts view:media')client.posts.query().eachdo |post|
putspostend

Authorization

For more information about scopes and how to obtain an application key and secret, check Cortex's authorization documentation.

Result object

Cortex::Client will return a Cortex::Result object. The following methods are available:

  • contents
  • is_error?
  • errors
  • page
  • per_page
  • total_items
  • range
  • range_start
  • range_end
  • raw_headers

Supported Endpoints

  • Users - me, get, save
  • Posts - query, get, save, delete, feed, feed/get, feed/get/released, feed/authors
  • Webpages - feed

TODO

  • Support Media endpoint

About

Cortex Ruby API Client

Resources

Stars

0 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages