forked from Pollenizer/AngelList
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAngelList.php
executable file
·49 lines (47 loc) · 981 Bytes
/
AngelList.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* AngelList
*
* PHP 5
*
* Licensed under The MIT License
* Redistributions of files must retain the below copyright notice.
*
* @author Robert Love <[email protected]>
* @copyright Copyright 2012, Pollenizer Pty. Ltd. (http://pollenizer.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* AngelList
*
* AngelList API
*
* @link http://angel.co/api
*/
class AngelList
{
/**
* Endpoint URL
*
* @var string
*/
public $endpointUrl = 'https://api.angel.co/1';
/**
* Get Response
*
* Returns a response for an API request
*
* @param string $url
* @return array $response
*/
public function getResponse($url)
{
$response = array();
if ($json = file_get_contents($url)) {
if ($response = json_decode($json, true)) {
return $response;
}
}
return $response;
}
}