Class: Findface::Gallery

Inherits:
Object
  • Object
show all
Defined in:
lib/findface/gallery.rb

Class Method Summary collapse

Class Method Details

.create(options) ⇒ Object

Endpoint: api.findface.pro/v0/galleries/ (POST) | Usage: FindFace::Gallery.create

Output: Creates a new gallery


15
16
17
18
# File 'lib/findface/gallery.rb', line 15

def create(options)
  options[:name] = Findface.format_gallery_name options[:name]
  API::request(:post, 'galleries', options)
end

.delete(name) ⇒ Object

Endpoint: api.findface.pro/v0/galleries/:name (DELETE) | Usage: FindFace::Gallery.delete(name)

Output: Deletes a gallery with matching gallery name


23
24
25
# File 'lib/findface/gallery.rb', line 23

def delete(name)
  API::request(:delete, "galleries/#{Findface.format_gallery_name name}")
end

.listObject

Endpoint: api.findface.pro/v0/galleries/ (GET) | Usage: FindFace::Gallery.list

Output: Returns list of galleries


8
9
10
# File 'lib/findface/gallery.rb', line 8

def list
  API::request(:get, 'galleries')
end