class HubbleObservatory::FsEmployee

Provides methods to interact with the Hubble API fs-employees endpoint @see hubble.fullscreen.net/api/docs#fsemployees-getting-jwt-token

Public Class Methods

create(access_token:) click to toggle source

@return [String] the token associated with the employee

# File lib/hubble_observatory/fs_employee.rb, line 6
def self.create(access_token:)
  request = HubbleObservatory::Request.new(attrs: {request_type: :get, route: "fs-employees/jwt-token", query_params: { access_token: access_token}, auth_header: false} )
  response= request.run_request
  if response && response[:data]
    response[:data][:attributes][:jwt_token]
  end
end