Download the PHP package javaabu/pgodb-sdk without Composer
On this page you can find all versions of the php package javaabu/pgodb-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download javaabu/pgodb-sdk
More information about javaabu/pgodb-sdk
Files in javaabu/pgodb-sdk
Package pgodb-sdk
Short Description The Criminal Justice Sector SDK is a wrapper package that allows developers to integrate their existing data infrastructure with the data-sharing platform developed by the Prosecutor General's Office.
License MIT
Homepage https://github.com/javaabu/pgodb-sdk
Informations about the package pgodb-sdk
The Criminal Justice Sector DataShare SDK
General PHP SDK to interact with the API of the Prosecutor General's Office's criminal justice sector database.
Installation
Use Composer to install the package
Pre-Requisites
- PHP 7.4
Basic Usage
Initialisation
The API key is taken as a single, mandatory parameter.
Note
- Check the SOP to understand how to get an API token (you may use either a personal access token or a password token). Use this as the
API_TOKEN
. - Use the
host
parameter, defined in the API documentation, as theBASE_URI
.
Retrieve all Models
Retrieve by Id
We do not use database ids, but rather administrative identification strings such as an individual's national identity card number, passport number, registration number (for judges and lawyers), incident reference numbers, gaziyyah numbers and the like.
This is a wrapper for the filter
functionality built into this package.
An alternate way of doing this is as follows:
The search term would change depending on the model being retrieved. The find
function
abstracts this complexity away for the user.
Store Non-Nested Model
Store Nested Model
Update Non-Nested Model
Update Nested Model
Sorting
`
Ending Functions
The ending functions of each of these chained functions are defined as follows. The actual API request will be sent once these ending functions are called at the end of the chain.
get()
Should return a list of items,find($id)
Should return a single item,delete($id)
Sends a delete request and returns true or false,store($data)
Returns the newly stored record,update($data)
Returns the updated record.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Ibrahim Hussain Shareef
- All Contributors
License
The MIT License (MIT). Please see License File for more information.