Skip to content

Commit 2e31a6c

Browse files
committed
updates to readme
1 parent 81f280f commit 2e31a6c

File tree

1 file changed

+65
-7
lines changed

1 file changed

+65
-7
lines changed

README.rst

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,33 @@ Getting Started
1616
Check out the included xcodeproj file. The demo project loads the embedly response into a table view. If
1717
you do not have a Pro Key, you will be limited to the services we support through `<http://api.embed.ly>`_.
1818

19+
Pro
20+
^^^
1921

20-
Importing Embedly into a Project
21-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22+
The Embedly iOS Library supports Embedly Pro accounts. If you have a pro key you can initialize the Embedly class
23+
with the initWithKey method::
24+
25+
Embedly *embedly = [[Embedly alloc] initWithKey:@"yourProKeyHere"];
26+
27+
If you do not have a Pro account, you can sign up for one at `Embedly Pro <http://pro.embed.ly>`_.
28+
29+
Choose an Endpoint
30+
^^^^^^^^^^^^^^^^^^
31+
32+
Our iOS Library supports all three of our endpoints. We recommend checking out how the responses differ between the three
33+
over at `Embedly Explore <http://explore.embed.ly>`_. The three endpoints are:
34+
35+
`oEmbed <http://pro.embed.ly/docs/oembed>`_
36+
This endpoint works for both Pro and Free accounts. If using with a free account, the responses are
37+
limited to the 204 services `listed here <http://api.embed.ly>`_. With a Pro account any URL will work.
38+
`Objectify <http://pro.embed.ly/docs/objectify>`_
39+
This endpoint is only available for Pro Users. It returns every bit of information we can determine about a URL.
40+
`Preview <http://pro.embed.ly/docs/Preview>`_
41+
This endpoint is only available for Pro Users. It returns a curated list of fields we think are most important
42+
including images, embeds, videos and descriptions.
43+
44+
Importing Embedly
45+
^^^^^^^^^^^^^^^^^
2246

2347
* Right click on your Project and select Add Existing Files
2448
* Navigate to where you have the Embedly Library checked out
@@ -52,26 +76,60 @@ Initializing Embedly
5276
[embedly callWithArray:urls];
5377

5478
* Embedly returns a JSON String. The iOS json-framework is included with the Embedly Demo project here.
55-
Read more about the json-framework at `<http://code.google.com/p/json-framework/>`_.
79+
Read more about the json-framework hosted in `Google Code <http://code.google.com/p/json-framework/>`_.
5680

5781

5882
Delegate
5983
^^^^^^^^
6084

61-
* In order for your Application to receive the information returned from Embedly you should
62-
implement the EmbedlyDelegate::
85+
In order for your Application to receive the information returned from Embedly you should
86+
implement the EmbedlyDelegate::
6387
6488
#import <UIKit/UIKit.h>
6589
#import "Embedly.h"
6690
@interface YourViewController : UIViewController <EmbedlyDelegate>
6791
{
6892
}
6993

70-
* There are 4 Methods that should be implemented as part of the Embedly Delgate. These map to the NSURLConnection
71-
responses::
94+
There are 4 Methods that should be implemented as part of the Embedly Delegate::
7295
7396
-(void) embedlyDidReturnRawData:(NSData *)data;
7497
-(void) embedlyDidLoad:(id)result;
7598
-(void) embedlyDidFailWithError:(NSError *)error;
7699
-(void) embedlyDidReceiveResponse:(NSURLResponse *)response;
77100

101+
embedlyDidReturnRawData
102+
This method receives the raw NSData object that gets returned from the URL. This method
103+
is useful if you would like to use your own JSON Parser to interpret the byte code
104+
105+
embedlyDidLoad
106+
This method receives either an NSDictionary or NSArray, depending on whether one or
107+
multiple URLs were passed to Embedly. You can use [result isKindOfClass:[NSArray class]]
108+
to determine what the object should be cast as. The NSDictionary allows you to access
109+
parameters by key, you can see what keys are returned in our `documentation <http://pro.embed.ly/docs>`_.
110+
111+
embedlyDidFailWithError
112+
Method returns if there's a problem accessing the API. This is not what gets returned from
113+
the API if a given URL is invalid. That is handled in a JSON object defined `here <https://pro.embed.ly/docs/oembed#error-codes>`_.
114+
115+
embedlyDidReceiveResponse
116+
This method fires when the response returns but before all the data has been received. This method maps
117+
directly to the NSURLConnection delegate method that Embedly receives.
118+
119+
120+
HTML5
121+
^^^^^
122+
123+
Embedly supports HTML5 as it is available. That said only a handful of our video providers are currently supporting HTML5 Video.
124+
That list is growing, but developers should bear in mind the limitations iOS faces with flash video. Our current list of HTML5
125+
supporters:
126+
127+
* Youtube
128+
* Whitehouse.gov
129+
* Ted.com
130+
* Posterous
131+
* FunnyOrDie
132+
* Flickr
133+
* Confreaks
134+
* Vimeo
135+
* Crocodoc

0 commit comments

Comments
 (0)