Class: Credly::Api::BadgeBuilder

Inherits:
Base
  • Object
show all
Defined in:
lib/credly/api/badge_builder.rb

Instance Attribute Summary

Attributes inherited from Base

#id, #response

Instance Method Summary collapse

Methods inherited from Base

#after_request, #before_request, #build_object, #delete, #get, #patch, #post, #put

Methods included from Requierable

#require_at_least_one_file, #require_present

Constructor Details

#initialize(options = {}) ⇒ BadgeBuilder

Returns a new instance of BadgeBuilder.



4
5
6
7
8
# File 'lib/credly/api/badge_builder.rb', line 4

def initialize(options = {})
  super
  @client = @client.dup
  @client.connection = @client.new_connection(:base_url => @client.options[:base_domain])
end

Instance Method Details

#tokenObject



10
11
12
# File 'lib/credly/api/badge_builder.rb', line 10

def token
  post("badge-builder/code", { 'access_token' => @client.access_token })
end

#versioned_path(path) ⇒ Object



14
15
16
# File 'lib/credly/api/badge_builder.rb', line 14

def versioned_path(path)
  path
end