class Leyline::Client

Defined in:

leyline/api/cats.cr
leyline/api/nodes.cr
leyline/api/quaggans.cr
leyline/api/skills.cr
leyline/api/titles.cr
leyline/api/tokeninfo.cr
leyline/api/worlds.cr
leyline/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(token : String | Nil = nil, language : String | Nil = nil) #

TODO Handle paging @page_size = Leyline::DEFAULT_PAGE_SIZE


[View source]

Instance Method Detail

def cat(id : String) #

[View source]
def cats(id_list : Array(String)) : Array(Cat) #

TODO Implement this and Client#worlds(Array(String)) at the same time


[View source]
def cats : Array(String) #

[View source]
def get(endpoint, params = {} of String => String) : String #

[View source]
def headers : HTTP::Headers #

[View source]
def headers=(headers : HTTP::Headers) #

[View source]
def node?(id : String) : Bool #

[View source]
def nodes : Array(String) #

[View source]
def permission?(perm : TokenInfo::Permissions) #

[View source]
def permission?(i : Int32) #

[View source]
def permission?(str : String) #

[View source]
def quaggan(id : String) #

[View source]
def quaggans(list : Array(String)) #

[View source]
def quaggans : Hash(String, String) #

[View source]
def request(endpoint, params = {} of String => String) : HTTP::Client::Response #

TODO Handle paging


[View source]
def skill(id : Int32) #

[View source]
def skill(id : String) #

[View source]
def skills(ids : Array(Int)) #

[View source]
def skills(ids : Array(String)) #

[View source]
def skills : Hash(String, Leyline::Skill) #

I wouldn't recommend using this unless you've got memory to spare 2900 objects will be cached in memory that only have a 1 hour life span


[View source]
def token=(str : String) #

[View source]
def token_info #

[View source]
def world(id : String) #

[View source]
def world(id : Int32) #

[View source]
def worlds(list : Array(String)) #

[View source]
def worlds #

[View source]