Download the PHP package yannelli/pocket-laravel without Composer

On this page you can find all versions of the php package yannelli/pocket-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pocket-laravel

Pocket Laravel SDK

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Introduction

Pocket Laravel SDK provides an expressive, fluent interface for interacting with the Pocket API. Using this SDK, you may easily access your recordings, transcripts, summaries, search, tags, folders, and action items from within your Laravel application.

The SDK handles authentication, request building, pagination, retry logic with exponential backoff, and exception mapping—allowing you to focus on building your application rather than managing HTTP requests.

Installation

You may install the Pocket Laravel SDK via the Composer package manager:

After installing the package, the service provider will be automatically registered via Laravel's package discovery.

Configuration

Before using the SDK, you will need to configure your Pocket API credentials. First, publish the configuration file using the vendor:publish Artisan command:

This command will publish a pocket.php configuration file to your application's config directory:

Next, add your Pocket API key to your application's .env file:

Making Requests

Using the Facade

The SDK provides a Pocket facade that allows you to fluently access all available resources:

Using Dependency Injection

If you prefer dependency injection, you may type-hint the Pocket class in your controller's constructor or method signatures. The SDK's service provider binds the Pocket class as a singleton, ensuring the same instance is resolved throughout your application:

Multi-Tenant Applications

For multi-tenant applications where each tenant may have their own Pocket API key, you may use the withApiKey method to create a new SDK instance with a different API key. All other configuration options are preserved from the original instance:

You may also create multiple tenant instances from a single base configuration:

[!NOTE] The withApiKey method returns a new Pocket instance. The original instance remains unchanged, making it safe to use in concurrent or queued operations.

Recordings

The recordings resource provides methods for listing, filtering, and retrieving recordings along with their associated transcripts, summaries, and action items.

Retrieving Recordings

To retrieve a paginated list of recordings, you may use the list method:

The list method returns a PaginatedRecordings instance. You may check for additional pages and retrieve subsequent results:

To retrieve a single recording by its ID, use the get method:

Filtering Recordings

The recordings resource provides several convenient methods for filtering results. You may filter recordings by folder:

To filter by tags, pass an array of tag IDs to the withTags method:

You may also filter recordings within a specific date range:

For more complex filtering, the list method accepts all filter parameters directly:

Iterating All Recordings

When you need to process all recordings, the all method returns a generator that automatically handles pagination:

You may also apply filters when iterating all recordings:

[!NOTE] The all method uses PHP generators to efficiently iterate through large result sets without loading all recordings into memory at once.

Recording Details

When retrieving a single recording, you may control which related data is included in the response. By default, all related data is included. To exclude specific data and improve response times:

Uploading Recordings

User API keys with the recordings:write scope may create a pre-signed upload URL and PUT audio to it. Organization API keys are not allowed for this endpoint.

Transcripts

Recordings may include transcript data with speaker identification and time-coded segments. You may access the transcript through the recording instance:

Summaries

Recordings may include AI-generated summaries organized into sections:

Action Items

Recordings may include extracted action items with priority levels and completion status:

Recording States

Recordings progress through various processing states. You may inspect a recording's current state using the following methods:

The available recording states are: pending, transcribing, failed, transcribed, summarizing, summarization_failed, completed, and unknown.

Search

Semantic search finds relevant content across transcripts, summaries, and action items:

Limit is capped at 20, matching the public API.

Folders

The folders resource returns the authenticated user's folder hierarchy, including nested children, recording counts, and spaces:

Tags

The tags resource provides methods for listing and finding tags:

Audio

The audio resource provides methods for accessing and downloading audio files associated with recordings.

Retrieving Audio URLs

To get a signed URL for a recording's audio file:

Signed URLs expire after a period of time. You may check if a URL has expired and retrieve a fresh one:

Downloading Audio

The SDK provides several methods for downloading audio content:

You may also save audio files directly to Laravel's filesystem:

To manually clean up temporary files created by the download method:

Scoped Audio Resource

When working with a single recording's audio, you may create a scoped audio resource to simplify method calls:

Users

Organization API keys with the users:read / users:write scopes can list members and administer settings. Personal user API keys are rejected on these routes.

Webhooks

Personal webhooks are configured in the Pocket app. The SDK verifies HMAC-SHA256 signatures from the X-HeyPocket-Signature and X-HeyPocket-Timestamp headers:

Organization-prefixed admin APIs (/api/v1/organization/:orgId/... for templates, API keys, analytics, and org webhooks) are documented by Pocket but are not wrapped by this SDK yet. The public /public/users aliases above cover org member administration.

Error Handling

The SDK throws specific exceptions based on the HTTP response status code. You may catch these exceptions to handle different error conditions:

[!NOTE] The RateLimitException provides a getRetryAfter() method that returns the number of seconds you should wait before making another request.

Configuration Reference

The following configuration options are available:

Option Environment Variable Default Description
api_key POCKET_API_KEY — Your Pocket API key
base_url POCKET_BASE_URL https://public.heypocketai.com API base URL
api_version POCKET_API_VERSION v1 API version
timeout POCKET_TIMEOUT 30 Request timeout in seconds
retry.times POCKET_RETRY_TIMES 3 Number of retry attempts
retry.sleep POCKET_RETRY_SLEEP 1000 Retry delay in milliseconds

Testing

To run the SDK's test suite:

Disclaimer

This is an unofficial SDK for the Pocket API, developed and maintained by Ryan Yannelli. It is not affiliated with, endorsed by, or officially connected to Pocket and Open Vision Engineering Inc any way. Use at your own risk. No warranties or guarantees are provided.

Requirements

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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


All versions of pocket-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
illuminate/support Version ^10.0||^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yannelli/pocket-laravel contains the following files

Loading the files please wait ...