2017 © Pedro Peláez
 

library weebly_client

PHP client for Weebly Platform API

image

weebly/weebly_client

PHP client for Weebly Platform API

  • Friday, April 20, 2018
  • by caitscarberry
  • Repository
  • 23 Watchers
  • 5 Stars
  • 3,327 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 4 Open issues
  • 9 Versions
  • 6 % Grown

The README.md

Weebly Client

Weebly Client is a basic PHP class that simplifies interactions with the Weebly REST API., (*1)

You can find more details about how to get set-up with your Weebly project at https://dev.weebly.com/get-started-with-developing-apps.html., (*2)

You can find details about the various endpoints that you may access with the Weebly Client at https://dev.weebly.com/about-rest-apis.html., (*3)

Usage

Instantiating the Client

You may insantiate a new Weebly Client as such:, (*4)

$client = new \Weebly\WeeblyClient($client_id, $client_secret, $user_id, $site_id, $access_token);

The only mandatory options that you must provide to the constructor are $client_id and $client_secret. You can find them both in your dev dashboard at https://www.weebly.com/developer-admin once you have registered a developer account with Weebly. Please store these credentials securely on your server, and do not expose them publically. The $user_id, site_id and $access_token are made accessible to you when a user grants your app permissions through the App OAuth flow. You do not need to provide these parameters unless you are accessing the OAuth methods. (i.e. Store APIs, Site APIs), (*5)

You can find more information about the OAuth flow at https://dev.weebly.com/authentication-with-oauth2.html., (*6)

Authorizing through the OAuth Flow

The WeeblyClient provides a few helper methods to aid you through the OAuth flow. * getAuthorizationUrl Returns a properly formatted authorization URL that you should respond with after our servers initiate the OAuth flow. * getAccessToken Retrieves the access token once you have obtained the necessary authorization code in OAuth., (*7)

You can find about how to configure the OAuth flow and how to obtain the $user_id, site_id and $access_token at https://dev.weebly.com/configure-oauth.html., (*8)

Making API Calls

We have provided simplified functions to make requests with the GET, POST, DELETE, PATCH and PUT methods., (*9)

Examples:

Get Site Details:, (*10)

$endpoint = '/user/sites/' . $site_id;
$response = $client->get($endpoint);

Mark a product as shipped:, (*11)

$endpoint = '/user/sites/' . $site_id . '/store/orders/' . $order_id . '/shipments/' . $order_shipment_id;
$product = ['tracking_number' => '1234567810abcde']; //Modifying the tracking_number on an unshipped product will mark it as shipped as well!
$response = $client->put($endpoint, $product);

You can find details about the various endpoints that you may access with the Weebly Client at https://dev.weebly.com/about-rest-apis.html., (*12)

Questions?

If you have any questions or feature requests pertaining to the Weebly Client, please open up a new issue. For general API questions, please contact us at dev-support@weebly.com, and we'll be happy to lend a hand!, (*13)

The Versions

20/04 2018

0.1.x-dev

0.1.9999999.9999999-dev

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

24/08 2017

dev-master

9999999-dev

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

24/08 2017

1.1.0

1.1.0.0

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

24/08 2017

dev-configurable-options

dev-configurable-options

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

17/07 2017

1.0.0

1.0.0.0

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

26/06 2017

dev-override-endpoints

dev-override-endpoints

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

01/09 2016

dev-access-tokenless-auth

dev-access-tokenless-auth

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

15/09 2015

dev-update-callback-urls

dev-update-callback-urls

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly

06/05 2015

0.1

0.1.0.0

PHP client for Weebly Platform API

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

weebly