Libraries tagged by object conversion

porkchopsandwiches/preserialiser

0 Favers
104 Downloads

A generic pre-serialiser for converting objects to generic types.

Go to Download


i-lateral/silverstripe-catalogue

9 Favers
1523 Downloads

Silverstripe module allowing creation of a custom product catalog with products and categories that can be created via the admin and accessed via their own URL's (like more conventional page objects)

Go to Download


sally/vk-keyboard

1 Favers
224 Downloads

package for converting vk api keyboard objects

Go to Download


codemagpie/array2object

0 Favers
6 Downloads

A high performance, Supports converting array into object and object into array, easy to use

Go to Download


phpcommon/doctrine-orm-specification-bridge

1 Favers
8 Downloads

Doctrine ORM bridge for converting specifications into queries.

Go to Download


jarobe42/historical-money

0 Favers
14 Downloads

A library for converting money historically

Go to Download


thaana-keyboard/converter

0 Favers
6 Downloads

thaana conversation object

Go to Download


unicon/unicon

1 Favers
3062 Downloads

Universal PHP variable converter. The main feature is converting arrays to an object of given class. In this case, Unicon follows PhpDoc annotations, works recursively to create the object's properties.

Go to Download


labile/vk-keyboard

0 Favers
160 Downloads

package for converting vk api keyboard objects

Go to Download


cjrasmussen/objectify

0 Favers
12 Downloads

Simple functions for converting associative arrays to objects and vice-versa

Go to Download


madmatt/silverstripe-flickr

2 Favers
2937 Downloads

Provides simple bindings for the Flickr API, converting API responses into SilverStripe objects

Go to Download


vbpupil/measurement-converter

0 Favers
180 Downloads

A simple but effective measurement converter which allows you to quickly create measurement objects that can be easily converted into other measurement formats, for example converting an Imperial measurement into Metric.

Go to Download


pamiris/javascript-constants

1 Favers
167 Downloads

A simple tool for converting PHP constant classes into javascript constant objects

Go to Download


daphascomp/daphascompsms

0 Favers
1 Downloads

# Authentication Requests made to our APIs must be authenticated, there are two ways to do this: 1. Authenticating using your API apiUsername and apiPassword - `Basic Auth` 2. Authenticating using an Auth Token - `Bearer Token` ## Method 1: Basic Auth Basic Authentication is a method for an HTTP user agent (e.g., a web browser) to provide a apiUsername and apiPassword when making a request. When employing Basic Authentication, users include an encoded string in the Authorization header of each request they make. The string is used by the request’s recipient to verify users’ identity and rights to access a resource. The Authorization header follows this format: > Authorization: Basic base64(apiUsername:apiPassword) So if your apiUsername and apiPassword are `onfon` and `!@pas123`, the combination is `onfon:!@pas123`, and when base64 encoded, this becomes `b25mb246IUBwYXMxMjM=`. So requests made by this user would be sent with the following header: > Authorization: Basic b25mb246IUBwYXMxMjM= | Description | | ---------------------------------------------------------------------------------------------- | | **apiUsername** `String` `Required` Your onfon account apiUsername, retrieved from portal | | **apiPassword** `String` `Required` Your onfon account apiPassword, retrieved from portal | ## Method 2: Bearer Tokens This authentication stategy allows you to authenticate using JSON Web Token ``JWT` that will expire after given duration. Each Access Token is a `JWT`, an encoded JSON object with three parts: the `header`, the `payload`, and the `signature`. The following is an example Access Token generated for Conversations > Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ### Getting the token To generate the token, make a `POST` request to `/v1/authorization` endpoint with your `apiUsername` and `apiPassword` This request should be made from your server and not on the client side such as browser or mobile environment. You will receive a JSON similar to below: `{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "validDurationSeconds": 3600}` You can use the token received to make API calls. The token will be valid for value of `validDurationSeconds`, before which you should generate a new token. #### Request Body ``` { "apiUsername": "root", "apiPassword": "hakty11" } ``` #### Response Body ``` { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "validDurationSeconds": 3600 } ``` #### Example Curl ``` curl --location --request POST 'https://apis.onfonmedia.co.ke/v1/authorization' \ --data-raw '{ "apiUsername": "correctapiUsername", "apiPassword": "correctapiPassword" } ``` #### Making an API call You will be required to pass the token in `Authorization` header prefixed by `Bearer` when calling other endpoints. Example `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`

Go to Download


jono20201/input-to-date

1 Favers
10144 Downloads

A small PHP library that assists with converting your user input into a Carbon object

Go to Download


<< Previous Next >>