Skip to content

whatpulse/api-sdk-ruby

Repository files navigation

whatpulse-sdk

WhatpulseSdk - the Ruby gem for the WhatPulse API

Public API for WhatPulse user data access. This API allows authenticated users to access their own data and public data from other users, depending on privacy settings.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Add this line to your application's Gemfile:

gem 'whatpulse-sdk'

And then execute:

bundle install

Or install it yourself as:

gem install whatpulse-sdk

API Key

To use the WhatPulse API, you'll need an API key. You can generate one by visiting: https://whatpulse.org/go/settings-api-keys

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'whatpulse-sdk'

# Setup authorization
WhatpulseSdk.configure do |config|
  # Configure Bearer authorization: http
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = WhatpulseSdk::ComputersApi.new
id = 'id_example' # String | User ID or username
opts = {
  is_archived: true # Boolean | 
}

begin
  #Get user computers
  result = api_instance.v1_users_computers(id, opts)
  p result
rescue WhatpulseSdk::ApiError => e
  puts "Exception when calling ComputersApi->v1_users_computers: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://whatpulse.test/api/v1

Class Method HTTP request Description
WhatpulseSdk::ComputersApi v1_users_computers GET /users/{id}/computers Get user computers
WhatpulseSdk::MembersApi v1_teams_members GET /teams/{team_id}/members Get team members
WhatpulseSdk::ProfilesApi v1_users_profiles GET /users/{id}/profiles Get user profiles
WhatpulseSdk::PulsesApi v1_users_pulses GET /users/{id}/pulses Get user pulses
WhatpulseSdk::SubteamMembersApi v1_teams_subteams_members GET /teams/{team_id}/subteams/{subteam_id}/members Get subteam members
WhatpulseSdk::SubteamsApi v1_teams_subteams GET /teams/{team_id}/subteams Get team subteams
WhatpulseSdk::SubteamsApi v1_teams_subteams_show GET /teams/{team_id}/subteams/{subteam_id} Get subteam details
WhatpulseSdk::TeamsApi v1_teams_index GET /teams Search teams
WhatpulseSdk::TeamsApi v1_teams_show GET /teams/{team_id} Get team details
WhatpulseSdk::TimeSeriesApi v1_users_time_series GET /users/{id}/time-series Get user time series
WhatpulseSdk::UsersApi v1_users_index GET /users Search users
WhatpulseSdk::UsersApi v1_users_show GET /users/{id} Get user details

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

http

  • Type: Bearer authentication

About

Public API SDK for Ruby

Resources

Stars

Watchers

Forks

Packages

No packages published