Class: Findface::Face
- Inherits:
-
Object
- Object
- Findface::Face
- Defined in:
- lib/findface/face.rb
Class Method Summary collapse
-
.create(options) ⇒ Object
Endpoint: api.findface.pro/v0/face/ (POST) | Usage: FindFace::Face.create Output: Creates a new face object.
-
.delete(face_id) ⇒ Object
Endpoint: api.findface.pro/v0/face/id/:id (DELETE) | Usage: FindFace::Face.delete(face_id) Output: Deletes a face with matching id.
-
.delete_by_meta(meta_string) ⇒ Object
Endpoint: api.findface.pro/v0/face/meta/:meta_string (DELETE) | Usage: FindFace::Face.delete_by_meta(meta_string) Output: Deletes a face with matching meta_string.
-
.details(face_id) ⇒ Object
Endpoint: api.findface.pro/v0/face/id/:id (GET) | Usage: FindFace::Face.details(face_id) Output: Returns the details of a face with matching id.
-
.details_by_meta(meta_string, pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/face/meta/:meta_string (GET) | Usage: FindFace::Face.details_by_meta(meta_string) Output: Returns the details of an face with matching meta_string.
-
.list(pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/faces/ (GET) | Usage: FindFace::Face.list Output: Returns list of faces.
-
.list_by_meta ⇒ Object
Endpoint: api.findface.pro/v0/meta/ (GET) | Usage: FindFace::Face.list_by_meta Output: Returns list of faces with meta information.
-
.update(face_id, options) ⇒ Object
Endpoint: api.findface.pro/v0/face/id/:id (PUT) | Usage: FindFace::Face.update(face_id) Output: Updates a face with matching id.
Class Method Details
.create(options) ⇒ Object
Endpoint: api.findface.pro/v0/face/ (POST) | Usage: FindFace::Face.create
Output: Creates a new face object
22 23 24 |
# File 'lib/findface/face.rb', line 22 def create API::request(:post, 'face', ) end |
.delete(face_id) ⇒ Object
Endpoint: api.findface.pro/v0/face/id/:id (DELETE) | Usage: FindFace::Face.delete(face_id)
Output: Deletes a face with matching id
50 51 52 |
# File 'lib/findface/face.rb', line 50 def delete face_id API::request(:delete, "face/id/#{face_id}") end |
.delete_by_meta(meta_string) ⇒ Object
Endpoint: api.findface.pro/v0/face/meta/:meta_string (DELETE) | Usage: FindFace::Face.delete_by_meta(meta_string)
Output: Deletes a face with matching meta_string
57 58 59 |
# File 'lib/findface/face.rb', line 57 def API::request(:delete, "face/meta/#{Findface.()}") end |
.details(face_id) ⇒ Object
Endpoint: api.findface.pro/v0/face/id/:id (GET) | Usage: FindFace::Face.details(face_id)
Output: Returns the details of a face with matching id
29 30 31 |
# File 'lib/findface/face.rb', line 29 def details face_id API::request(:get, "face/id/#{face_id}") end |
.details_by_meta(meta_string, pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/face/meta/:meta_string (GET) | Usage: FindFace::Face.details_by_meta(meta_string)
Output: Returns the details of an face with matching meta_string
36 37 38 |
# File 'lib/findface/face.rb', line 36 def , pages = nil Findface.get_list "face/meta/#{Findface.()}", pages end |
.list(pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/faces/ (GET) | Usage: FindFace::Face.list
Output: Returns list of faces
8 9 10 |
# File 'lib/findface/face.rb', line 8 def list pages = nil Findface.get_list 'faces', pages end |
.list_by_meta ⇒ Object
Endpoint: api.findface.pro/v0/meta/ (GET) | Usage: FindFace::Face.list_by_meta
Output: Returns list of faces with meta information
15 16 17 |
# File 'lib/findface/face.rb', line 15 def API::request(:get, 'meta') end |
.update(face_id, options) ⇒ Object
Endpoint: api.findface.pro/v0/face/id/:id (PUT) | Usage: FindFace::Face.update(face_id)
Output: Updates a face with matching id
43 44 45 |
# File 'lib/findface/face.rb', line 43 def update face_id, API::request(:put, "face/id/#{face_id}", ) end |