Download the PHP package fidlines/fidlines without Composer
On this page you can find all versions of the php package fidlines/fidlines. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fidlines/fidlines
More information about fidlines/fidlines
Files in fidlines/fidlines
Package fidlines
Short Description Get random fidQ --Fareed Kubanda-- bars for your inspiration
License MIT
Informations about the package fidlines
FidQ Fidlines API & PHP Pakage
API
Overview
In partnership with Twitter Community, we're making bars|lines|michano|mistari from Fareed Kubanda (Fid Q) public available in near real time. Fidlines enables easy access of FidQ's lines from Android, iOS and the web.
Please email [email protected] if you find any bugs.
URI and Versioning
We hope to improve the API over time. The changes won't always be backward compatible, so we're going to use versioning. This first iteration will have URIs prefixed with http://fidlines.fun/api/v0/
and is structured as described below. There is currently no rate limit.
For versioning purposes, only removal of a non-optional field or alteration of an existing field will be considered incompatible changes. Consumers should gracefully handle additional fields they don't expect, and simply ignore them.
Design
The v0 API is essentially a dump of our in-memory data structures. We know, what works great locally in memory isn't so hot over the network. Many of the awkward things are just the way fidlines works internally. Want to know the total number of comments on an article? Traverse the tree and count.
I'm not saying this to defend it - It's not the ideal public API, but it's the one we could release in the time we had. While awkward, it's possible to implement most of actions using it.
Lines
Refered to as bars, lines, mistari, michano in different formats can be retrived and in only one way be posted to this API
/v0/line[s]
.
All lines have some of the following properties, with required properties in bold:
Field | Mandate | Description |
---|---|---|
id | Required | The lines's unique id. |
bar | Required | This is is the fidline, a bar from fidQ sing |
song | Optional | The song from which the bar is extracted |
ft | Optional | This is a name of person featured in a song |
album | Optional | The album from which the song belongs |
year | Optional | The year corresponding son was released |
url | Optional | The online resource the song can be retrived |
Random line
Method: GET
For example, a random bar: http://fidlines.fun/api/v0/random
Sample Respose:
Multiple lines
Method: GET
Multiple lines can be retived with: http://fidlines.fun/api/v0/lines
with default pagination of 20 lines.
Pagnation can be altered by number of bars as adding ?pagination={number}
like http://fidlines.fun/api/v0/lines?pagination=45
Sample Response:
Specific line
Method: GET
One can retrive a specific bar by its unique id like: http://fidlines.fun/api/v0/line/{id}
example http://fidlines.fun/api/v0/line/55f8545b04927b
Sample response:
Add bar line
Method: POST
Endpoint: http://fidlines.fun/api/v0/line
This will add new bar but unless it is verified by langage cheacker the wont be publicly retrivable
Sample Request:
Sample Response:
Searching
Searching lines with specific keywords is a work in progress.
Support
For answers you may not find in the Wiki, avoid posting issues. Feel free to ask for support via email [email protected]. Make sure to mention fidlinesApiIssue so he is notified.
License
The rest of this API is licensed under the BSD 3-Clause license.
Fidlines Library
Are you coding in PHP? Fidlines library makes it easy to send HTTP requests to retrive Fid Q bars, here refeered as lines.
Installing Fidlines
The recommended way to install Fidlines is through Composer.
Fidlines, usage
Call Fidlines package as below,
Now, in functions call