Download the PHP package code-corner/api-bridge without Composer
On this page you can find all versions of the php package code-corner/api-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download code-corner/api-bridge
More information about code-corner/api-bridge
Files in code-corner/api-bridge
Package api-bridge
Short Description Unified PHP Client for X, Facebook, and Google Maps
License MIT
Informations about the package api-bridge
APIBridge: Unified PHP Client for Twitter, Facebook, and Google Maps
Overview
APIBridge is a PHP client library designed to simplify interactions with popular APIs including Twitter, Facebook, and Google Maps. This library provides an intuitive and unified interface for making API requests, handling authentication, and parsing responses.
Features
- Twitter Integration: Fetch user details and recent tweets.
- Facebook Integration: Retrieve user information and page posts.
- Google Maps Integration: Obtain geocoding and distance information.
- Error Handling: Manage and handle API errors gracefully.
Installation
To get started with APIBridge, follow these steps:
-
Clone the Repository:
-
Install Dependencies:
Make sure you have Composer installed. Then, run:
Configuration
Before using the API client, you need to set up authentication tokens and API keys for each service.
Example Configuration
File: config.php
Usage
Twitter Client
Facebook Client
Google Maps Client
Running Tests
To ensure everything is working correctly, you can run the provided PHPUnit tests.
-
Install PHPUnit:
- Run Tests:
API Reference
Twitter Client Methods
getUser($username)
: Fetches user information by username.getTweets($userId)
: Retrieves recent tweets by user ID.
Facebook Client Methods
getUser($userId)
: Retrieves user information by user ID.getPagePosts($pageId)
: Fetches posts from a Facebook page by page ID.
Google Maps Client Methods
getGeocode($address)
: Retrieves geocoding information for a given address.getDistance($origins, $destinations)
: Fetches distance data between origins and destinations.
Contributing
Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md
for submitting pull requests and issues.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any questions or issues, please contact us at [email protected].