class Basecampeverest::Comment

Public Class Methods

all() click to toggle source

find all #### via the Basecamp API

@return [Basecampeverest::Project] #### from the Basecamp API

# File lib/basecampeverest/resources/comment.rb, line 6
def self.all
    url = 
    response = Basecampeverest::Connect.get 

    # parse the response to remove HTTParty info
    response.parsed_response
end
delete() click to toggle source

#### via the Basecamp API

@param [Basecampeverest::Project] #### @return [Basecampeverest::Project] ####

# File lib/basecampeverest/resources/comment.rb, line 69
def self.delete()
    url = "####"
    response = Basecampeverest::Connect.delete url

    # This checks the response code for validity and error checking
    if response.code == 204
        message = "#### successfully deleted"
    elsif response.code == 403
        message = "You do not have permission to delete this ####"
    else 
        message = "Invalid project ID or authentication. The #### was not deleted."
    end

    # return the message
    message
end
find() click to toggle source

#### via the Basecamp API

@param [Basecampeverest::Project] #### @return [Basecampeverest::Project] #### from the Basecamp API

# File lib/basecampeverest/resources/comment.rb, line 18
def self.find()
    url = 
    response = Basecampeverest::Connect.get 

    # parse the response to remove HTTParty info
    response.parsed_response
end
new(options={}) click to toggle source

#### via the Basecamp API

@param [Basecampeverest::Project] #### @param [Basecampeverest::Project] #### @return [Basecampeverest::Project] #### from the Basecamp API

# File lib/basecampeverest/resources/comment.rb, line 32
def self.new(options={})
    post_params = {
      :body => options.to_json,
      :headers => Basecampeverest::Connect.headers.merge({'Content-Type' => 'application/json'})
    }
    # make the http basecamp call
    url = "####"
    response = Basecampeverest::Connect.post url, post_params

    # parse the response to remove HTTParty info
    response.parsed_response
end
update() click to toggle source

#### via the Basecamp API

@param [Basecampeverest::Project] #### @param [Basecampeverest::Project] #### @return [Basecampeverest::Project] from the Basecamp API

# File lib/basecampeverest/resources/comment.rb, line 50
def self.update()
    post_params = {
      :body => options.to_json,
      :headers => Basecampeverest::Connect.merge({'Content-Type' => 'application/json'})
    }

    # make the http basecamp call
    url = 
    response = Basecampeverest::Connect.put url, post_params

    # parse the response to remove HTTParty info
    response.parsed_response
end