You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+65-7Lines changed: 65 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,33 @@ Getting Started
16
16
Check out the included xcodeproj file. The demo project loads the embedly response into a table view. If
17
17
you do not have a Pro Key, you will be limited to the services we support through `<http://api.embed.ly>`_.
18
18
19
+
Pro
20
+
^^^
19
21
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
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:
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.
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
+
^^^^^^^^^^^^^^^^^
22
46
23
47
* Right click on your Project and select Add Existing Files
24
48
* Navigate to where you have the Embedly Library checked out
@@ -52,26 +76,60 @@ Initializing Embedly
52
76
[embedly callWithArray:urls];
53
77
54
78
* 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/>`_.
56
80
57
81
58
82
Delegate
59
83
^^^^^^^^
60
84
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
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
0 commit comments