Class: ATProto::TokenSession
- Extended by:
- T::Sig
- Defined in:
- lib/at_protocol/session.rb
Instance Attribute Summary
Attributes inherited from Session
#access_token, #did, #pds, #refresh_token, #xrpc
Instance Method Summary collapse
-
#initialize(token, pds = "https://bsky.social") ⇒ TokenSession
constructor
A new instance of TokenSession.
- #open! ⇒ Object
Methods inherited from Session
#delete!, #get_session, #inspect, #refresh!
Methods included from RequestUtils
at_uri, #create_session_uri, #default_authenticated_headers, #default_headers, #delete_record_uri, #delete_session_uri, #get_paginated_data, #get_post_thread_uri, #get_session_uri, #mute_actor_uri, #query_obj_to_query_params, #refresh_session_uri, #refresh_token_headers, #resolve_handle, #upload_blob_uri
Constructor Details
#initialize(token, pds = "https://bsky.social") ⇒ TokenSession
Returns a new instance of TokenSession.
82 83 84 85 86 |
# File 'lib/at_protocol/session.rb', line 82 def initialize(token, pds = "https://bsky.social") @token = token @pds = pds open! end |
Instance Method Details
#open! ⇒ Object
88 89 90 |
# File 'lib/at_protocol/session.rb', line 88 def open! @xrpc = XRPC::Client.new(@pds, @token) end |