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
For more details on the Zencoder API requirements visit
@@ -85,6 +85,49 @@ The previous JSON example would become:
85
85
));
86
86
87
87
88
+
GENERAL API REQUESTS
89
+
--------------------
90
+
A general API request can be used for all API functionality including **Job Listing**, **Job Details**, **Account Creation**, **Account Details** (even Job Creation if desired). See the [API docs](http://zencoder.com/docs/api/) for all possible API requests.
91
+
The first argument is the **API URL**.
92
+
The second argument is your **API Key**.
93
+
The third argument is the **request parameters** if needed. It can either be a JSON string or an array of parameters.
94
+
95
+
96
+
#### Example Job List Request
97
+
98
+
$request = new ZencoderRequest(
99
+
'https://app.zencoder/api/jobs',
100
+
'93h630j1dsyshjef620qlkavnmzui3'
101
+
);
102
+
103
+
if ($request->successful) {
104
+
print_r($request->results);
105
+
} else {
106
+
foreach($request->errors as $error) {
107
+
echo $error."\n";
108
+
}
109
+
}
110
+
111
+
#### Example Account Creation Request
112
+
113
+
$request = new ZencoderRequest(
114
+
'https://app.zencoder/api/account',
115
+
false, // API key isn't needed for new account creation
116
+
array(
117
+
"terms_of_service" => "1",
118
+
"email" => "test@example.com",
119
+
"password" => "1234"
120
+
)
121
+
);
122
+
123
+
if ($request->successful) {
124
+
print_r($request->results);
125
+
} else {
126
+
foreach($request->errors as $error) {
127
+
echo $error."\n";
128
+
}
129
+
}
130
+
88
131
89
132
NOTIFICATION HANDLING
90
133
----------------------
@@ -152,5 +195,5 @@ Your [notifications page](https://app.zencoder.com/notifications) will come in h
152
195
153
196
VERSIONS
154
197
---------
155
-
198
+
Version 1.1 - 2010-06-04 Added General API Requests
0 commit comments