Skip to content

Commit 868efe2

Browse files
committed
Add README
1 parent 375c861 commit 868efe2

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

README.rst

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
PHP Sendgrid Subuser API
2+
========================
3+
4+
This PHP library makes it easy to work with the `SendGrid Subuser API`_.
5+
It was made to scratch our own itch, and as such it currently only
6+
implements the parts of the API that we needed. Please feel free to
7+
request additional features or send pull requests.
8+
9+
.. _SendGrid Subuser API: http://docs.sendgrid.com/documentation/api/customer-subuser-api/customer-api/
10+
11+
Basic Usage
12+
-----------
13+
14+
::
15+
16+
$sendgrid = new SendGrid\Api("my_username", "my_password");
17+
// Create a new sub user
18+
$user = new SendGrid\SubUser("wanted_username", "password",
19+
"email@example.com", "email.domain.example.com");
20+
$sendgrid->addSubUser($user);
21+
// Retrieve existing sub user
22+
$other = $sendgrid->getSubUser("sub_username");
23+
// Assign IPs to a user
24+
$other->assignIps(array("1.2.3.4"));
25+
26+
See `example/example.php` for more examples. ::
27+
28+
License
29+
-------
30+
31+
This library is licensed under The BSD License.
32+
33+
Copyright (c) 2012, Eliksir AS All rights reserved.
34+
35+
Redistribution and use in source and binary forms, with or without
36+
modification, are permitted provided that the following conditions are
37+
met:
38+
39+
Redistributions of source code must retain the above copyright notice,
40+
this list of conditions and the following disclaimer. Redistributions in
41+
binary form must reproduce the above copyright notice, this list of
42+
conditions and the following disclaimer in the documentation and/or other
43+
materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY
44+
THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
45+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
46+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
47+
EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
48+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
49+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
50+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
51+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54+
SUCH DAMAGE.

0 commit comments

Comments
 (0)