class FbookGraph::Client

Attributes

token[RW]

Attributes

Public Class Methods

new(token) click to toggle source

Constructor

# File lib/fbook_graph/client.rb, line 7
def initialize(token)
  @token = token
end

Public Instance Methods

my_friends(**search_options) click to toggle source
# File lib/fbook_graph/client.rb, line 21
def my_friends(**search_options)
  options = {
    access_token: token,
    fields: 'friends'
  }

  Friend.all(search_options, options: options)
end
my_images(*albums) click to toggle source

Instance Methods

# File lib/fbook_graph/client.rb, line 12
def my_images(*albums)
  options = {
    access_token: token,
    fields: 'photos{album,images}'
  }

  Image.all(albums: albums, options: options)
end