@omegabigdata/honoplay-api-helper-node
v0.5.7
Published
Honoplay api helper
Downloads
181
Readme
Introduction
Bu doküman honoplay-api-helper-node'un nasıl kullanılacağını açıklar.
Get Started
Used Module Description
"axios" : Promise tabanlı olarak yayınlanmış, tarayıcı ve node.js tarafında çalışabilir bir HTTP client.
npm install axios yarn add axios
"axios-retry" : Başarısız istekleri engelleyen ve mümkün olduğunda bunları yeniden deneyen Axios eklentisi.
npm install axios-retry yarn add axios-rety
Installation
npm i @omegabigdata/honoplay-api-helper-node yarn add @omegabigdata/honoplay-api-helper-node
Components
Admin User
Admin User componenti register, authenticate ve renew token işlemlerini kapsar.
Register
Kullanıcının register işleminin gerçekleşmesini sağlar.
POST /api/AdminUser/register
| Parameter | Type | Description |
| :--- | :--- | :--- |
| registerModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
registerModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| email
| string
| Required. |
| password
| string
| Required. |
| name
| string
| Required. |
| surname
| string
| Required. |
Authenticate
Kullanıcının bilgilerinin doğrulandığı ve token işleminin gerçekleştirildiği kısımdır.
GET /api/AdminUser/authenticate
| Parameter | Type | Description |
| :--- | :--- | :--- |
| getAuthenticateModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
getAuthenticateModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| email
| string
| Required. |
| password
| string
| Required. |
Renew Token
Token yenileme işleminin gerçekleşmesini sağlar.
POST /api/AdminUser/renew-token
| Parameter | Type | Description |
| :--- | :--- | :--- |
| token
| string
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
Status
Status componenti hangi ortamda çalıştığımızı öğrenebileceğimiz fonksiyonu kapsar.
Status
GET /api/Status
| Parameter | Type | Description |
| :--- | :--- | :--- |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
Tenant
Tenant componenti Tenant ekleme, Tenant güncelleme, Tenant listeleme ve id'ye göre Tenant bilgileri listeleme fonksiyonlarını kapsar.
Tenant Ekleme
Sisteme Tenant ekleme işlemini gerçekleştirir.
POST /api/Tenant
| Parameter | Type | Description |
| :--- | :--- | :--- |
| tenantModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
tenantModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| name
| string
| Required. |
| description
| string
| Required. |
| hostName
| string
| Required. |
| logo
| string
| Required. |
Tenant Güncelleme
Sistemde kayıtlı olan Tenant bilgilerinin güncellenmesini sağlar.
PUT /api/Tenant
| Parameter | Type | Description |
| :--- | :--- | :--- |
| tenantModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
tenantModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| id
| int
| Required. Tenant id|
| name
| string
| Required. |
| description
| string
| Required. |
| hostName
| string
| Required. |
| logo
| string
| Required. |
Tenant Listeleme
Sistemde kayıtlı olan Tenant'ların görüntülenmesini sağlar.
GET /api/Tenant
| Parameter | Type | Description |
| :--- | :--- | :--- |
| skip
| int
| Required. Kaç items atlansın|
| take
| int
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
İstenilen Tenant Bilgilerini Listeleme
Sistemde kayıtlı olan istenilen Tenant bilgilerinin görüntülenmesini sağlar.
GET /api/Tenant/{id}
| Parameter | Type | Description |
| :--- | :--- | :--- |
| tenantId
| int
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
departmentModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| tenantId
| int
| Required. |
| departments
| object
| Required. departmen name |
Traniee
Tenant componenti Trainee ekleme, Trainee güncelleme, Trainee listeleme ve id'ye göre Trainee bilgilerini listeleme fonksiyonlarını kapsar.
Traniee Ekleme
Sisteme Traniee ekleme işlemini gerçekleştirir.
POST /api/Traniee
| Parameter | Type | Description |
| :--- | :--- | :--- |
| traineeModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
traineeModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| name
| string
| Required. |
| surname
| string
| Required. |
| nationalIdentitynumber
| int
| Required. |
| phonenumber
| string
| Required. |
| gender
| int
| Required. |
| workingStatusId
| string
| Required. |
| departmentId
| string
| Required. |
Traniee Güncelleme
Sistemde kayıtlı olan Trainee bilgilerinin güncellenmesini sağlar.
PUT /api/Traniee
| Parameter | Type | Description |
| :--- | :--- | :--- |
| traineeModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
traineeModel
| Parameter | Type | Description |
| :--- | :--- | :--- |
| id
| int
| Required. Traniee id|
| name
| string
| Required. |
| surname
| string
| Required. |
| nationalIdentitynumber
| int
| Required. |
| phonenumber
| string
| Required. |
| gender
| int
| Required. |
| workingStatusId
| string
| Required. |
| departmentId
| string
| Required. |
Trainee Listeleme
Sistemde kayıtlı olan Trainee'lerin görüntülenmesini sağlar.
GET /api/Traniee
| Parameter | Type | Description |
| :--- | :--- | :--- |
| skip
| int
| Required. Kaç items atlansın|
| take
| int
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
İstenilen Trainee Bilgilerini Getirme
Sistemde kayıtlı olan istenilen Trainee bilgilerinin görüntülenmesini sağlar.
GET /api/Traniee/{id}
| Parameter | Type | Description |
| :--- | :--- | :--- |
| traineeId
| int
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
Department
Department componenti Departman ekleme ve Departmanları listeleme fonksiyonlarını kapsar.
Department Listeleme
Sistemde kayıtlı olan Departmanların görüntülenmesini sağlar.
GET /api/Department
| Parameter | Type | Description |
| :--- | :--- | :--- |
| skip
| int
| Required. Kaç items atlansın|
| take
| int
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
Departman Ekleme
Sisteme Departman ekleme işleminin gerçekleştirilmesini sağlar.
POST /api/Department
| Parameter | Type | Description |
| :--- | :--- | :--- |
| departmentModel
| object
| Required. |
| successCallback
| function
| Required. İşlem başarılı bir şekilde sonuçlandığında successCallback çalışır. |
| errorCallback
| function
| Required. İşlem bir hata ile sonuçlandığında Invalid Parameters mesajı gösterilir.|
Responses
Geçersiz bir istek gönderilirse veya başka bir hata oluşursa, aşağıdaki durum kodlarını döndürür:
Status Code
| Status Code | Description |
| :--- | :--- |
| 200 | SUCCESS
|
| 201 | CREATED
|
| 400 | BAD REQUEST
|
| 404 | NOT FOUND
|
| 409 | CONFLICT
|
| 500 | INTERNAL SERVER ERROR
|