ios设备的发布和删除方法

时间:2012-02-07 04:27:13

标签: iphone ios ios4

将播放列表添加到youtube帐户

POST /feeds/api/playlists/PLAYLIST_ID HTTP/1.1
Host: gdata.youtube.com
Content-Type: application/atom+xml
Content-Length: CONTENT_LENGTH
Authorization: AuthSub token="AUTHORIZATION_TOKEN"
GData-Version: 2
X-GData-Key: key=DEVELOPER_KEY

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:yt="http://gdata.youtube.com/schemas/2007">
<id>VIDEO_ID</id>
<yt:position>1</yt:position>
</entry>

删除youtube帐户的播放列表

DELETE /feeds/api/users/USERNAME/playlists/PLAYLIST_ID HTTP/1.1
Host: gdata.youtube.com
Content-Type: application/atom+xml
Authorization: AuthSub token="AUTHORIZATION_TOKEN"
GData-Version: 2
X-GData-Key: key=DEVELOPER_KEY

如何在IOS中将这两种方法发送到YOUTUBE服务器并获得结果。 ihave都需要数据(例如令牌和allthat)但是idont知道如何将此帖子和删除方法发送到服务器并获得响应

1 个答案:

答案 0 :(得分:0)

如果您在项目中仅使用Google的API,则可以使用GData Objective-C客户端库

http://code.google.com/p/gdata-objectivec-client/

他们有extensive documentationexamples