Skip to content

Laravel Package to query user details from worldlink.

License

Notifications You must be signed in to change notification settings

rupeshstha/worldlink-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Worldlink API Laravel Package

Latest Version Issues Downloads

Worldlink API is a Laravel Package used to query user details from worldlink.

Getting Started

This package can be installed through Composer.

composer require thebikramlama/worldlink

How to obtain User details from worldlink

After the installation is complete, Worldlink alias is generated by default.

Using the default Alias

// Using Default 
use Worldlink;

Getting the user details

// Intialize a new instance
$worldlink = new Worldlink;
// Call the method named query passing worldlink's username as the argument
$response = $worldlink->query('username'); // This will return a pseudo JSON data.

// Getting a specific field from the response
json_decode($response)->data->full_name; // This will return the full name from the retrieved data

Getting specific user field

// Intialize a new instance
$worldlink = new Worldlink;
// Call the method named query passing worldlink's username as the argument
$worldlink->query('username'); // This will return a pseudo JSON data.

// Getting a specific field from the response
$worldlink->getField('full_name'); // This will return the full name from the retrieved data
$worldlink->getField('days_left'); // This will return the days left from the retrieved data

Available Fields

$worldlink->getField('user');  // Username
$worldlink->getField('full_name'); // Full Name
$worldlink->getField('current_plan'); // Current Internet Plan
$worldlink->getField('message'); // Generic Message from the provider
$worldlink->getField('days_left'); // Days left for subscription expiry
$worldlink->getField('amount'); // Amount to pay on renewal
$worldlink->getField('advance_payment'); // Flag for advance payment availability (true, false, paid)
$worldlink->getField('expires_at'); // Full Formatted Date for exipry
$worldlink->getField('expires_at_unix'); // Unix timestamp for exipry
$worldlink->getField('payment_options'); // Other Payment options (in array)

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel Package to query user details from worldlink.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages