Download the PHP package pdiazdumont/foursquare-api-php-wrapper without Composer

On this page you can find all versions of the php package pdiazdumont/foursquare-api-php-wrapper. 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 foursquare-api-php-wrapper

Foursquare API PHP Wrapper

Introduction

This project offers a more semantic way of accessing the Foursquare API using PHP. Instead of just wrapping the http requests it allows you to access the information using the following syntax:

Features:

Installation

This library can be installed using Composer by running the following command:

Usage

There are three use cases: requesting an access token from a user, querying the API and accessing the real time data. All these cases require the same code of initialization:

Initialization

Require the autoloader in order to make all the wrapper classes available.

Include the API client class.

Instantiate a new client. The required parameters are the application id and the application secret provided by Foursquare after registering your application.

Getting an access token from a user

Certain API requests require permission from the users in order to access their information. The following code demonstrates how to retrieve and store the token that grants permission to your application.

Performing requests

The API client exposes a method for each of the resources available in the Foursquare API, this resources are: users, venues, venue groups, checkins, tips, lists, updates, photos, settings, specials, events and page updates. Each one of them has its own methods and arguments so the resulting structure of an api request is:

Examples:

By reading the API documentation is easy to determine the methods that are available and the required arguments. The following code illustrates how to query the API, note that this time the access token is set directly.

Real time API

This functionality can be activated in the Foursquare application dashboard and allows your application to receive a POST request every time one of your users do a checkin. The wrapper allows you to validate the request and extract the information received.

Tests

To run the tests first you need to set an application id and an application secret in the file tests/FoursquareAPICredentials.php then run the phpunit command in the root folder of the project.


All versions of foursquare-api-php-wrapper with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.1
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 pdiazdumont/foursquare-api-php-wrapper contains the following files

Loading the files please wait ....