Class: Findface::Gallery
- Inherits:
-
Object
- Object
- Findface::Gallery
- Defined in:
- lib/findface/gallery.rb
Class Method Summary collapse
-
.create(options) ⇒ Object
Endpoint: api.findface.pro/v0/galleries/ (POST) | Usage: FindFace::Gallery.create Output: Creates a new gallery.
-
.delete(name) ⇒ Object
Endpoint: api.findface.pro/v0/galleries/:name (DELETE) | Usage: FindFace::Gallery.delete(name) Output: Deletes a gallery with matching gallery name.
-
.list ⇒ Object
Endpoint: api.findface.pro/v0/galleries/ (GET) | Usage: FindFace::Gallery.list Output: Returns list of galleries.
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() [:name] = Findface.format_gallery_name [:name] API::request(:post, 'galleries', ) 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 |
.list ⇒ Object
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 |