module Okezoneid::SSOComment

Public Instance Methods

sso_get_comment(params) click to toggle source
# File lib/okezoneid/sso_comment.rb, line 26
def sso_get_comment(params)
        comment = {:body =>  {:content_id => params['content_id'],
                                                                                                :offset => params['offset'],
                                                                                                :limit => params['limit']}}

        token = sso_get_token
        response = token.get(api_comment_path, comment)
        return response.body
end
sso_post_comment(params) click to toggle source
# File lib/okezoneid/sso_comment.rb, line 8
def sso_post_comment(params)
        comment = {:body =>  {:content_id => params['content_id'],
                                                                                                :okezone_id => params['okezone_id'],
                                                                                                :channel_id => params['channel_id'],
                                                                                                :title => params['title'],
                                                                                                :date_created => params['date_created'],
                                                                                                :from_name => params['from_name'],
                                                                                                :request_url => params['request_url'],
                                                                                                :comment => params['comment'],
                                                                                                :parent_id => params['parent_id'],
                                                                                                :source => params['source']}}
        

        token = sso_get_token
        response = token.post(api_comment_path, comment)
        return response.body
end