Sha256: 1a40932075fab09599a91d1e1b94eab30df81a8c183de3e1de2282ee8fe3f5fd

Contents?: true

Size: 520 Bytes

Versions: 16

Compression:

Stored size: 520 Bytes

Contents

module Localeapp
  module Routes
    module Projects
      def project_endpoint(options = {})
        [:get, project_url(options)]
      end

      def project_url(options = {})
        options[:format] ||= 'json'
        http_scheme.build(base_options.merge(:path => project_path(options[:format]))).to_s
      end

    private

      def project_path(format = nil)
        path = "/#{VERSION}/projects/#{Localeapp.configuration.api_key}"
        path << ".#{format}" if format
        path
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
localeapp-3.3.0 lib/localeapp/routes/projects.rb
localeapp-3.2.0 lib/localeapp/routes/projects.rb
localeapp-3.1.3 lib/localeapp/routes/projects.rb
localeapp-3.1.2 lib/localeapp/routes/projects.rb
localeapp-3.1.1 lib/localeapp/routes/projects.rb
localeapp-3.1.0 lib/localeapp/routes/projects.rb
localeapp-3.0.1 lib/localeapp/routes/projects.rb
localeapp-3.0.0 lib/localeapp/routes/projects.rb
localeapp-2.5.0 lib/localeapp/routes/projects.rb
localeapp-2.4.0 lib/localeapp/routes/projects.rb
localeapp-2.3.0 lib/localeapp/routes/projects.rb
localeapp-2.2.0 lib/localeapp/routes/projects.rb
localeapp-2.1.1 lib/localeapp/routes/projects.rb
localeapp-2.1.0 lib/localeapp/routes/projects.rb
localeapp-2.0.0 lib/localeapp/routes/projects.rb
localeapp-1.0.2 lib/localeapp/routes/projects.rb