Download the PHP package fightbulc/cirrus without Composer
On this page you can find all versions of the php package fightbulc/cirrus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cirrus
iiii i::::i iiii cccccccccccccccciiiiiiirrrrr rrrrrrrrr rrrrr rrrrrrrrr uuuuuu uuuuuu ssssssssss cc:::::::::::::::ci:::::ir::::rrr:::::::::r r::::rrr:::::::::r u::::u u::::u ss::::::::::s c:::::::::::::::::c i::::ir:::::::::::::::::r r:::::::::::::::::r u::::u u::::u ss:::::::::::::s c:::::::cccccc:::::c i::::irr::::::rrrrr::::::rrr::::::rrrrr::::::ru::::u u::::u s::::::ssss:::::s c::::::c ccccccc i::::i r:::::r r:::::r r:::::r r:::::ru::::u u::::u s:::::s ssssss c:::::c i::::i r:::::r rrrrrrr r:::::r rrrrrrru::::u u::::u s::::::s c:::::c i::::i r:::::r r:::::r u::::u u::::u s::::::s c::::::c ccccccc i::::i r:::::r r:::::r u:::::uuuu:::::u ssssss s:::::s c:::::::cccccc:::::ci::::::ir:::::r r:::::r u:::::::::::::::uus:::::ssss::::::s c:::::::::::::::::ci::::::ir:::::r r:::::r u:::::::::::::::us::::::::::::::s cc:::::::::::::::ci::::::ir:::::r r:::::r uu::::::::uu:::u s:::::::::::ss cccccccccccccccciiiiiiiirrrrrrr rrrrrrr uuuuuuuu uuuu sssssssssss
Cirrus
What is Cirrus?
Soundcloud API Reader Library to fetch and process data about users, tracks and playlists.
Any dependencies?
Cirrus comes as an composer package. Requirements are >= PHP 5.3, its CURL extension and a CURL handler class. Also, you need an API key from Soundcloud. Register here.
Setup
- Download
- Run
- Get Soundcloud API key
- Start hacking
Structure
All fetched results are wrapped in value object classes. This means that you can access all response values by method call.
`
In general VOs enable us to maintain our code much better. Especially if we don't have any influence on the reference as its the case with soundcloud's API.
Need more input? Have a look at this piece of text.
Example: User
1. Get user data
How to get e.g. a user's full name:
2. Get user data and its relations
Its up to you which data you would like to fetch. See below all possible options.
3. Get only a certain type of a user's relation data
Just need e.g. a user's tracks? Here you go:
Example: Track
Fetching track data is based on the same principles as for the user data.
1. Get track data
As you might notice the tracks data doesn't come with a complete set of user data. If you want to fetch all user details just add to your query:
As a result you could now access the complete user details by .
Summary of all possible queries
1. User data
Class:
Query:
Relationships:
- Tracks: or via
- Playlists: or via
- Followers: or via
- Followings: or via
- Favorites: or via
2. Track data
Class:
Query:
Relationships:
- User data:
3. Playlist data
Class:
Query:
Relationships:
- User data:
Artwork & Avatar image sizes
Soundcloud offers a couple of image sizes for track artwork- and user avatars.
Soundcloud's default size is set to . To choose from one of the above listed sizes you can make use of .
User avatar
Track artwork
Anything else?
Still in doubt how to use this library? Have a look at the folder. I included there examples for all fetchable data. Make sure that you rename the to . And don't forget to put your API Key.
License
Cirrus is freely distributable under the terms of the MIT license.
Copyright (c) 2012 Tino Ehrich ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.