Download the PHP package yogigr/wpthemeapi without Composer
On this page you can find all versions of the php package yogigr/wpthemeapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yogigr/wpthemeapi
More information about yogigr/wpthemeapi
Files in yogigr/wpthemeapi
Package wpthemeapi
Short Description A package for browsing WordPress themes using the Envato API. This package allows you to easily search, filter, and retrieve information about WordPress themes from Envato, streamlining the process of finding the perfect theme for your website.
License MIT
Informations about the package wpthemeapi
wpthemeapi
A Laravel package for browsing WordPress themes using the Envato API. This package allows you to easily search, filter, and retrieve information about WordPress themes from Envato, streamlining the process of finding the perfect theme for your website.
Installation
To install the WpThemeApi
package, follow these steps:
-
Require the Package via Composer
Run the following command in your Laravel project directory:
-
Publish the Configuration File
Publish the configuration file using the following command:
-
Set Up Environment Variables
Add your Envato API token to your .env file:
Usage
After installation, you can use the package via the provided Facade. Below are examples of how to fetch categories and items.
Fetch Categories
To fetch WordPress themes categories:
Parameters for `categories`
- `string $path` : The path filter for categories. Default is "wordpress/". Only categories that contain this path will be returned.
Fetch Items
To fetch items:
Parameters for `items`
- `string $category`: The category of items to fetch. Default is "wordpress".
- `string $sortBy`: The attribute to sort the items by. Sort by one of the following: "relevance", "rating", "sales", "price", "date", "updated", "category", "name", "trending", "featured_until". Default is "sales".
- `string $sortDir`: The direction to sort the items ("asc" for ascending, "desc" for descending). Default is "desc".
- `int $perPage`: The number of items to fetch per page. Default is 10.
- `int $page`: The page number to fetch. Default is 1.