Download the PHP package coopbelvedere/laravel-basecamp-api without Composer

On this page you can find all versions of the php package coopbelvedere/laravel-basecamp-api. 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 laravel-basecamp-api

Laravel Basecamp API

[!WARNING] This repo is now readonly and no longer maintained.

An API wrapper for Basecamp 3.

Prerequisites

Create an integration

Visit https://launchpad.37signals.com/integrations and register your app.

Add the credentials in your .env file as:

And add the config variables to your config/services.php file:

OAuth2

The Basecamp3 API only supports 3-legged authentication and makes calls on behalf of one user. To receive an access token, you can use Laravel Socialite with the 37signals Socialite Driver. After you save the access token and the desired Basecamp3 account, you can now create an instance of the API wrapper.

Add the socialite service provider to your config/app.php providers array key:

Add the socialite event listener in your app/Providers/EventServiceProvider.php listen property:

Installation

Add a user-agent to identify your app in your config/basecamp.php file. This is mandatory or any request will return a 400 error.

Usage

Retrieve your basecamp id, base uri (href), token and refresh token and initialize the API wrapper. Here's a basic example on the routes/web.php file to get you started.

NOTE: You shouldn't initialize the API in the callback route, this is only to show you what data to keep from the socialite user. Save this data in the database, and/or the session to keep the connection active.

Caching

The client uses a Laravel Filesystem cache strategy by default. You can override this with your preferred Laravel cache store:

Middlewares (optional)

You can optionally add an array of middlewares to the Guzzle Handler Stack. Here is an example for logging a request:

Event Listener

The Client also comes with a middleware which will refresh an expired access token and automatically retry the intended endpoint. You can listen to the basecamp.refreshed_token event to update the access token in your app. The event returns 2 parameters, your basecamp user id and the new access token.

You can add something like this in your EventServiceProvider.php boot method:

Pagination

Most collection of resources in Basecamp can be paginated.

Resources documentation

License

MIT

Copyright (c) 2017-present, Coopérative Belvédère Communication


All versions of laravel-basecamp-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-fileinfo Version *
illuminate/support Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
kevinrob/guzzle-cache-middleware Version ^3.0|^4.0
illuminate/cache Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/filesystem Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^6.5 || ^7.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 coopbelvedere/laravel-basecamp-api contains the following files

Loading the files please wait ....