Skip to content

Commit 29471e2

Browse files
committed
Created api class template with most bare-bones class.
1 parent e4366f1 commit 29471e2

File tree

2 files changed

+21
-364
lines changed

2 files changed

+21
-364
lines changed

api_class_template.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/**
4+
The most bare bones API library example
5+
6+
*/
7+
8+
9+
class yourApi extends APIBaseClass{
10+
// move this to an external config file for best pratice
11+
//
12+
public static $api_key = '';
13+
public static $api_url = 'http://yourapiurl.com';
14+
public function __construct($url=NULL,$api_key=NULL)
15+
{
16+
// api key for now is optional, but will probably need to look into new_request to ensure the key
17+
// is handled properly
18+
self::new_request(($url?$url:self::$api_url));
19+
}
20+
21+
}

example_api.php

Lines changed: 0 additions & 364 deletions
This file was deleted.

0 commit comments

Comments
 (0)