Sha256: 549e37e18c69c7c415a7bdd18c81a0eb1b48d7bdb66cab6a53fcac85b0749afe

Contents?: true

Size: 576 Bytes

Versions: 37

Compression:

Stored size: 576 Bytes

Contents

module Catalogcat
  class Client < Footrest::Client
    module Courses
      def list_courses(page = 1, params = {})
        get("/api/v1/courses?page=#{page}&per_page=100", params)
      end

      def create_course(params = {})
        post('/api/v1/courses', params)
      end

      def update_course(id, params = {})
        put("/api/v1/courses/#{id}", params)
      end

      def get_course(id, params = {})
        get("/api/v1/courses/#{id}", params)
      end

      def delete_course(course)
        delete("/api/v1/courses/#{course}")
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
bearcat-1.5.37 lib/catalogcat/client/courses.rb
bearcat-1.5.36 lib/catalogcat/client/courses.rb
bearcat-1.5.35 lib/catalogcat/client/courses.rb
bearcat-1.5.34 lib/catalogcat/client/courses.rb
bearcat-1.5.33 lib/catalogcat/client/courses.rb
bearcat-1.5.32 lib/catalogcat/client/courses.rb
bearcat-1.5.31 lib/catalogcat/client/courses.rb
bearcat-1.5.30 lib/catalogcat/client/courses.rb
bearcat-1.5.29 lib/catalogcat/client/courses.rb
bearcat-1.5.28 lib/catalogcat/client/courses.rb
bearcat-1.5.28.beta1 lib/catalogcat/client/courses.rb
bearcat-1.5.26 lib/catalogcat/client/courses.rb
bearcat-1.5.24 lib/catalogcat/client/courses.rb
bearcat-1.5.23 lib/catalogcat/client/courses.rb
bearcat-1.5.20 lib/catalogcat/client/courses.rb
bearcat-1.5.19 lib/catalogcat/client/courses.rb
bearcat-1.5.17 lib/catalogcat/client/courses.rb
bearcat-1.5.16 lib/catalogcat/client/courses.rb
bearcat-1.5.15 lib/catalogcat/client/courses.rb
bearcat-1.5.14 lib/catalogcat/client/courses.rb