-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cfm
36 lines (24 loc) · 1.61 KB
/
test.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!---
Name: Test.cfm
Author: CF Mitrah (http://cfmitrah.com/blog/)
Date: 04 May 2011
--->
<cfset blogger = createObject("component", "blogger")>
<!--- Authenticating --->
<cfset bloggerUserName = "YourGoogleID">
<cfset bloggerPassword = "YourGooglePwd">
<cfset bloggerAuth = blogger.authenticate(bloggerUserName,bloggerPassword)>
<!--- Retrieving - Blogs, Posts and Comments --->
<cfset myBlogs = blogger.getBlogList()><cfdump var="#myBlogs#" label="Blogs"><br />
<cfset getPost = blogger.getPostList('YourBlogID')><!--- Blog Id can be get it from above myBlogs query ---><cfdump var="#getPost#" label="Posts - For your Blog"><br />
<cfset getComment = blogger.getComment('YourBlogID','YourPostID')><!--- Post Id can be get it from above getPost query ---><cfdump var="#getComment#" label="Comments - Your Blog post"><br />
<!--- Creating - Posts and Comments --->
<cfset sendPost = blogger.publishPost('YourBlogID','Post Title','Post Content','Author Name','[email protected]')>
<cfset sendComment = blogger.publishComment('YourBlogID','YourPostID','Comment','Comment Desc','Author Name','[email protected]')>
<!--- Drafting a Post --->
<cfset sendDraftPost = blogger.DraftPost('YourBlogID','Post Title','Post Content','Author Name','[email protected]')>
<!--- Updating a Post --->
<cfset updatePost = blogger.updatePost('YourBlogID','YourPostID','Updated Post Title','Updated Post Content','Author Name','[email protected]')>
<!--- Deleting - Posts and Comments --->
<cfset deletePost = blogger.deletePost('YourBlogID','YourPostID')>
<cfset deleteComment = blogger.deleteComment('YourBlogID','YourPostID','YourCommentID')>