dev-master
9999999-dev http://github.com/mikaelbr/phpcoderwallPHP library for fetching Coderwall data
MIT
The Requires
- php >5.3.0
coderwall coderwall api
PHP library for fetching Coderwall data
For easier installation you should also have composer installed., (*1)
getUser("mikaelbr", true); // E.g. use: echo $user->name; ?>
Notice: The second argument defines if we want to fetch full information about a user. This entails more user properties and full information about the team given user is a part of., (*2)
Property | Description |
---|---|
username | The username of given user. |
name | Full name of the user. |
location | Location of the user. E.g. Norway. |
endorsements | The number of endorsements a user has recived. |
team | This is a ID to the users team. Can be run through PhpCoderwall#getTeamById() to get full team information. |
accounts | Collection of all the account types the user has on Coderwall. See more information under properties of the Account object. |
badges | A collection of CoderwallBadges. See more information about the badges class below. |
badgesCount | The number of total badges the user has. |
Property | Description |
---|---|
title | Self set title for user. |
company | What company the user works for |
thumbnail | URL to the avatar image thumbnail. |
specialities | Collection of strings. A set of specialities the user has added. |
accomplishments | Collection of strings. A set of accomplishments the user has added |
Property | Description |
---|---|
type | The account type. Either github, twitter or linkedin |
username | The users username on the given account type. |
Property | Description |
---|---|
name | The name of the achivement/badge. |
description | Extended badge description |
created | A timestamp of when the user recived the badge. E.g. "2012-02-23T19:03:55Z" |
badge | URL to the badge image. |
getTeam("Github"); // E.g. use: echo $team->score; ?>
Notice: As per now, the Coderwall's Team API isn't really open and working, so there is a 5 min cache. This means that if you try to first get the Github team and right away the Heroku team, you'll get the Github team information both times. We'll just have to wait until Coderwall releases the Team API to the public., (*3)
Property | Description |
---|---|
name | The name of the team. |
id | The teams unique ID. |
score | Score in the Coderwall leader board. |
rank | Ranking in the Coderwall leader board. |
size | Number of team members |
slug | Filtered team name, used in the Coderwall URL. |
avatar | URL to the image avatar. |
country | Collection of strings. With each index a country of the given team. |
neighbors | Overview of the team neighbors. Collection of simplified CoderwallTeam objects with all properties set, except the following: neighbors and teamMembers |
teamMembers | Overview of the teams members. Collection of simplified CoderwallUser objects only with the following properties set: username, name, endorsements and badgesCount |
getTeamById("4f27193d973bf0000400029d"); // E.g. use: echo $team->name; // Github ?>
Returns a CoderwallTeam object as seen above., (*4)
Install phpCoderwall by using composer and add a composer.json
file
to your root, with the following content:, (*5)
{ "require": { "mikaelbr/phpcoderwall": "dev-master" } }
Then run (in the root, with a terminal), depending on your setup, either, (*6)
composer install
or, (*7)
php composer.phar install
With this you can try to run a example as shown above., (*8)
You can also use this library without composer. Just get the code base by cloning the repository, and either write an auto load function or require the files manually., (*9)
PHP library for fetching Coderwall data
MIT
coderwall coderwall api