Class: BungieSdk::Destiny2::Membership

Inherits:
ApiAgent
  • Object
show all
Defined in:
lib/bungie_sdk/membership.rb

Overview

Represents a Destiny 2 Membership

Constant Summary

Constants inherited from ApiAgent

ApiAgent::BASE_URI

Instance Attribute Summary

Attributes inherited from ApiAgent

#data

Instance Method Summary collapse

Methods inherited from ApiAgent

#delete, #get, #initialize, #post, #put, #request, #run

Constructor Details

This class inherits a constructor from BungieSdk::ApiAgent

Instance Method Details

#idObject



13
14
15
# File 'lib/bungie_sdk/membership.rb', line 13

def id
  data['membershipId']
end

#profile(components: [DestinyComponentType.Profiles]) ⇒ Object



20
21
22
# File 'lib/bungie_sdk/membership.rb', line 20

def profile(components: [DestinyComponentType.Profiles])
  Profile.new(run(get(profile_url, params: { components: components.join(',') })).body)
end

#typeObject



7
8
9
# File 'lib/bungie_sdk/membership.rb', line 7

def type
  data['membershipType']
end