Skip to content

Latest commit

 

History

History
154 lines (101 loc) · 4.25 KB

UserApi.md

File metadata and controls

154 lines (101 loc) · 4.25 KB

EtsyApi::UserApi

All URIs are relative to https://openapi.etsy.com

Method HTTP request Description
get_me GET /v3/application/users/me
get_user GET /v3/application/users/{user_id}

get_me

get_me

General ReleaseReport bug

This endpoint is ready for production use.

Returns basic info for the user making the request.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = EtsyApi::UserApi.new

begin
  
  result = api_instance.get_me
  p result
rescue EtsyApi::ApiError => e
  puts "Error when calling UserApi->get_me: #{e}"
end

Using the get_me_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_me_with_http_info

begin
  
  data, status_code, headers = api_instance.get_me_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ModelSelf>
rescue EtsyApi::ApiError => e
  puts "Error when calling UserApi->get_me_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

ModelSelf

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_user

get_user(user_id)

General ReleaseReport bug

This endpoint is ready for production use.

Returns user profile for the user identified by a user ID.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = EtsyApi::UserApi.new
user_id = 56 # Integer | 

begin
  
  result = api_instance.get_user(user_id)
  p result
rescue EtsyApi::ApiError => e
  puts "Error when calling UserApi->get_user: #{e}"
end

Using the get_user_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_user_with_http_info(user_id)

begin
  
  data, status_code, headers = api_instance.get_user_with_http_info(user_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <User>
rescue EtsyApi::ApiError => e
  puts "Error when calling UserApi->get_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer

Return type

User

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json