Sha256: 3c68d27f6aa0e3d35d4cd71d1263955a8754a1b3588e44bd8b9b8a472bf3d23e

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

module Voog
  class API

    # Voog Site API methods.
    #
    # @see http://www.voog.com/developers/api/resources/site
    module Site

      # Get site attributes
      #
      # @see http://www.voog.com/developers/api/resources/site#get_site
      def site(params = {})
        get 'site', {query: params}
      end

      # Update a site
      #
      # @see http://www.voog.com/developers/api/resources/site#update_sites
      def update_site(data)
        put "site", data
      end

      # Patch a site
      #
      # @see http://www.voog.com/developers/api/resources/site#patch_sites
      def patch_site(data)
        patch "site", data
      end

      # Update/create a key in site data field
      #
      # @param id [String] key in data field
      #
      # @see http://www.voog.com/developers/api/resources/site#update_site_data
      def update_site_data(id, data)
        put "site/data/#{id}", {value: data}
      end

      # Delete a key from site data field
      #
      # @param id [String] key in data field
      #
      # @see http://www.voog.com/developers/api/resources/site#delete_site_data_field
      def delete_site_data(id)
        delete "site/data/#{id}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voog_api-0.0.16 lib/voog_api/api/site.rb
voog_api-0.0.15 lib/voog_api/api/site.rb
voog_api-0.0.14 lib/voog_api/api/site.rb
voog_api-0.0.13 lib/voog_api/api/site.rb
voog_api-0.0.12 lib/voog_api/api/site.rb
voog_api-0.0.11 lib/voog_api/api/site.rb