Sha256: 9fe8417f0fca2260699ed94e394af13fd7c6ae42ecbecbfa05581be60e629f54
Contents?: true
Size: 1.4 KB
Versions: 7
Compression:
Stored size: 1.4 KB
Contents
# frozen_string_literal: true module Strava module Api module Endpoints module Uploads # # Uploads a new data file to create an activity from. # # @option options [File] :file # The uploaded file. # @option options [String] :name # The desired name of the resulting activity. # @option options [String] :description # The desired description of the resulting activity. # @option options [Boolean] :trainer # Whether the resulting activity should be marked as having been performed on a trainer. # @option options [Boolean] :commute # Whether the resulting activity should be tagged as a commute. # @option options [String] :data_type # The format of the uploaded file. # @option options [String] :external_id # The desired external identifier of the resulting activity. # def create_upload(options = {}) Strava::Models::Upload.new(post('uploads', options)) end # # Returns an upload for a given identifier. # # @option options [String] :id # The identifier of the upload. # def upload(id_or_options, options = {}) id, options = parse_args(id_or_options, options) Strava::Models::Upload.new(get("uploads/#{id}", options)) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems