Skip to content

Commit

Permalink
lol h3
Browse files Browse the repository at this point in the history
  • Loading branch information
broskoski committed Nov 5, 2012
1 parent 0df0500 commit 78e2bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $channel = $arena->get_channel($slug, array('page' => $page, 'per' => $per));

The Channel class can (and should) be extended to serve particular needs and goals, but there are a few convience methods included in this extremely early version of the library.

#### Sorting a channel's contents
### Sorting a channel's contents
At the moment, there is no API support for retrieving contents in a specific order, so for now we can sort the channel's contents after the fact (please keep in mind that if you are paginating, you are only going to be sorting the sum of what you retrieved).

Options for sorting:
Expand All @@ -49,13 +49,13 @@ Options for sorting:
<?php $channel->set_sort_order($direction) ?>
```

#### Printing a list of authors (main author and all collaborators)
### Printing a list of authors (main author and all collaborators)
```
<?= $channel->authors_to_sentence(); ?>
```
Example output: 'Charles Broskoski, John Michael Boling, Dena Yago, Damon Zucconi, J. Stuart Moore, and Emily Segal'

#### Looping through channel contents (blocks and channels)
### Looping through channel contents (blocks and channels)

For the sake of simplicity, contents in a channel are all set to class 'Block'. The contents can be looped through using the each_item() method like so:
```
Expand Down
4 changes: 2 additions & 2 deletions lib/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function __construct($path, $options = null, $params = null) {
curl_setopt($this->request, CURLOPT_RETURNTRANSFER, true);

// set X-AUTH-TOKEN if defined
if ($config['auth_token'] !== ''){
curl_setopt($this->request, CURLOPT_HTTPHEADER, array('X-AUTH-TOKEN: '.$config['auth_token']));
if ($config['access_token'] !== ''){
curl_setopt($this->request, CURLOPT_HTTPHEADER, array('HTTP_AUTHORIZATION: Bearer '.$config['access_token']));
}

// set POST data
Expand Down

0 comments on commit 78e2bdc

Please sign in to comment.