generated from alleyinteractive/create-wordpress-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide base README documentation outlining class methods
- Loading branch information
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Class JW_Player | ||
|
||
This class will implement the base `Adapter` interface. Instantiating this class with a `JW_Player_API` object will allow the request to be made to get the latest videos to be synced. This class may be used to work with a theme's custom integration with JW Player. | ||
|
||
Example Integration: | ||
|
||
```shell | ||
\Alley\WP\WP_Video_Sync\Sync_Manager::init() | ||
->with_adapter( | ||
new \Alley\WP\WP_Video_Sync\Adapters\JW_Player( | ||
new \Alley\WP\WP_Video_Sync\API\JW_Player_API( | ||
[PROPERTY_ID], | ||
[API_KEY] | ||
) | ||
) | ||
) | ||
->with_batch_size() | ||
->with_frequency() | ||
->with_callback( | ||
function ( $video ) { | ||
// Do something with the video. | ||
} | ||
); | ||
``` | ||
|
||
## Class JW_Player_7_For_WP | ||
|
||
This class is to work with the JW Player 7 for WordPress plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Class JW_Player_API | ||
|
||
This class is used for constructing an object for making an API call to the JW Player API. Simply pass your API key and API Secret on instantiation. Please reference the interface `API_Requester` for the required methods. This object may be used to pass to the `JW_Player` adapter. | ||
|
||
## Class Request | ||
|
||
This class will handle the generation of the URL for performing an API request. The API response will call the `parse_response` method which will subsequently call the `parse_success()` or `parse_error()` method of the `API_Requester` object that is used to construct this object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Class Adapter | ||
|
||
Adhere to the Adapter interface to create a new adapter for syncing videos. | ||
|
||
## Class API_Request | ||
|
||
Adhere to the API_Request interface to provide the necesssary methods for making and processing an API request. |