Sha256: 94de829ef781b8c11c8ce71cc907da4fc9c8b6739a9caa7644adf4ebbabe2921

Contents?: true

Size: 827 Bytes

Versions: 2

Compression:

Stored size: 827 Bytes

Contents

module FakeShopify
  class StubApp < Sinatra::Base
    # Report API Endpoints
    get "/admin/api/:api_version/reports.json" do
      json_response 200, fixture(params[:api_version], "analytics/report/index")
    end

    get "/admin/api/:api_version/reports/:report_id.json" do
      json_response 200, fixture(params[:api_version], "analytics/report/show")
    end

    post "/admin/api/:api_version/reports.json" do
      json_response 200, fixture(params[:api_version], "analytics/report/create")
    end

    put "/admin/api/:api_version/reports/:report_id.json" do
      json_response 200, fixture(params[:api_version], "analytics/report/update")
    end

    delete "/admin/api/:api_version/reports/:report_id.json" do
      json_response 200, fixture(params[:api_version], "analytics/report/destroy")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fake_shopify-0.2.0 lib/fake_shopify/routes/analytics.rb
fake_shopify-0.1.1 lib/fake_shopify/routes/analytics.rb