diff --git a/README.md b/README.md index 5b7cb2d..b50b644 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # Scale -![Scale Logo](https://scale.ai/static/global/facebook-card.png) +![Scale Logo](https://scale.com/static/global/facebook-card.png) This is the official Scale RubyGem (`scaleapi`). -[Scale](https://scale.ai) is an API for Human Intelligence. Businesses like Alphabet (Google), Uber, Proctor & Gamble, Houzz, and many more use us to power tasks such as: +[Scale](https://scale.com) is an API for Human Intelligence. Businesses like Alphabet (Google), Uber, Proctor & Gamble, Houzz, and many more use us to power tasks such as: - Draw bounding boxes and label parts of images (to train ML algorithms for self-driving cars) - Transcribe documents, images, and webpages - Scrape websites - Triage support tickets - Categorize and compare images, documents, and webpages -Scale is actively hiring software engineers - [apply here](https://scale.ai/about#jobs). +Scale is actively hiring software engineers - [apply here](https://scale.com/about#jobs). ## Installation @@ -40,7 +40,7 @@ scale = Scale.new(api_key: 'SCALE_API_KEY') Note that you can optionally provide a `callback_auth_key` and `callback_url` when initializing the Scale client. You can also set `default_request_params` which is a `Hash` that will be included in every request sent to Scale (either as a query string param or part of the request body). -If you're having trouble finding your API Key or Callback Auth Key, then go to the [Scale Dashboard](https://scale.ai/dashboard). If you set a default `callback_url` in your account settings, you won't need to pass it in everytime. +If you're having trouble finding your API Key or Callback Auth Key, then go to the [Scale Dashboard](https://scale.com/dashboard). If you set a default `callback_url` in your account settings, you won't need to pass it in everytime. ## Creating Tasks @@ -53,7 +53,7 @@ For every type of task, you can pass in the following options when creating: ### Categorization Tasks -To create a [categorization task](https://docs.scale.ai/#create-categorization-task), run the following: +To create a [categorization task](https://docs.scale.com/#create-categorization-task), run the following: ```ruby require 'scale' scale = Scale.new(api_key: 'SCALE_API_KEY') @@ -86,11 +86,11 @@ scale.tasks.create({ This will also return a `Scale::Api::Tasks::Categorization` object. -[Read more about creating categorization tasks](https://docs.scale.ai/#create-categorization-task) +[Read more about creating categorization tasks](https://docs.scale.com/#create-categorization-task) ### Comparison Tasks -To create a [comparison task](https://docs.scale.ai/#create-comparison-task), run the following: +To create a [comparison task](https://docs.scale.com/#create-comparison-task), run the following: ```ruby require 'scale' scale = Scale.new(api_key: 'SCALE_API_KEY') @@ -129,11 +129,11 @@ scale.tasks.create({ This will also return a `Scale::Api::Tasks::Comparison` object. -[Read more about creating comparison tasks](https://docs.scale.ai/#create-comparison-task) +[Read more about creating comparison tasks](https://docs.scale.com/#create-comparison-task) ### Datacollection Tasks -To create a [datacollection task](https://docs.scale.ai/#create-datacollection-task), run the following: +To create a [datacollection task](https://docs.scale.com/#create-datacollection-task), run the following: ```ruby require 'scale' scale = Scale.new(api_key: 'SCALE_API_KEY') @@ -141,7 +141,7 @@ scale = Scale.new(api_key: 'SCALE_API_KEY') scale.create_datacollection_task({ callback_url: 'http://www.example.com/callback', instruction: 'Find the URL for the hiring page for the company with attached website.', - attachment: 'https://scale.ai/', + attachment: 'https://scale.com/', attachment_type: 'website', fields: { hiring_page: 'Hiring Page URL' @@ -160,7 +160,7 @@ scale.tasks.create({ type: 'datacollection', callback_url: 'http://www.example.com/callback', instruction: 'Find the URL for the hiring page for the company with attached website.', - attachment: 'https://scale.ai/', + attachment: 'https://scale.com/', attachment_type: 'website', fields: { hiring_page: 'Hiring Page URL' @@ -170,12 +170,12 @@ scale.tasks.create({ This will also return a `Scale::Api::Tasks::Datacollection` object. -[Read more about creating datacollection tasks](https://docs.scale.ai/#create-data-collection-task) +[Read more about creating datacollection tasks](https://docs.scale.com/#create-data-collection-task) ### Image Recognition Tasks -To create an [image recognition task](https://docs.scale.ai/#create-image-recognition-task), run the following: +To create an [image recognition task](https://docs.scale.com/#create-image-recognition-task), run the following: ```ruby require 'scale' scale = Scale.new(api_key: 'SCALE_API_KEY') @@ -236,11 +236,11 @@ scale.tasks.create({ This will also return a `Scale::Api::Tasks::ImageRecognition` object. -[Read more about creating image recognition tasks](https://docs.scale.ai/#create-image-recognition-task) +[Read more about creating image recognition tasks](https://docs.scale.com/#create-image-recognition-task) ### Transcription Tasks -To create a [transcription task](https://docs.scale.ai/#create-transcription-task), run the following: +To create a [transcription task](https://docs.scale.com/#create-transcription-task), run the following: ```ruby require 'scale' scale = Scale.new(api_key: 'SCALE_API_KEY') @@ -278,12 +278,12 @@ scale.tasks.create({ This will also return a `Scale::Api::Tasks::Transcription` object. -[Read more about creating transcription tasks](https://docs.scale.ai/#create-transcription-task) +[Read more about creating transcription tasks](https://docs.scale.com/#create-transcription-task) ### Audio Transcription Tasks -To create an [audio transcription task](https://docs.scale.ai/#create-audio-transcription-task), run the following: +To create an [audio transcription task](https://docs.scale.com/#create-audio-transcription-task), run the following: ```ruby require 'scale' scale = Scale.new(api_key: 'SCALE_API_KEY') @@ -314,7 +314,7 @@ scale.tasks.create({ This will also return a `Scale::Api::Tasks::AudioTranscription` object. -[Read more about creating audio transcription tasks](https://docs.scale.ai/#create-audio-transcription-task) +[Read more about creating audio transcription tasks](https://docs.scale.com/#create-audio-transcription-task) ## Listing Tasks @@ -383,7 +383,7 @@ second_page = first_page.next_page `scale.tasks.list` is aliased to `scale.tasks.where` and `scale.tasks.all`. -For more information, [read our documentation](https://docs.scale.ai/#list-all-tasks) +For more information, [read our documentation](https://docs.scale.com/#list-all-tasks) ## Finding tasks by ID diff --git a/lib/scale/api.rb b/lib/scale/api.rb index f25748d..06ea484 100644 --- a/lib/scale/api.rb +++ b/lib/scale/api.rb @@ -4,7 +4,7 @@ class Scale class Api < Struct.new(:api_key, :callback_auth_key, :default_request_params, :logging) - SCALE_API_URL = 'https://api.scale.ai/v1/' + SCALE_API_URL = 'https://api.scale.com/v1/' SCALEAPI_GEM_INFO = Gem.loaded_specs["scaleapi"] SCALE_RUBY_CLIENT_VERSION = SCALEAPI_GEM_INFO ? SCALEAPI_GEM_INFO.version.to_s : '0.1.1'.freeze diff --git a/scaleapi-ruby.gemspec b/scaleapi-ruby.gemspec index 2de9c82..a7d3f49 100644 --- a/scaleapi-ruby.gemspec +++ b/scaleapi-ruby.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.summary = %q{Official Ruby Client for Scale API} spec.description = %q{Scale is an API For Human Intelligence. Get high quality results for all sorts of tasks within minutes. This is the official Ruby client.} - spec.homepage = "https://scale.ai" + spec.homepage = "https://scale.com" spec.license = "MIT" diff --git a/spec/cassettes/audio_transcription.yml b/spec/cassettes/audio_transcription.yml index c576b3e..abafdd2 100644 --- a/spec/cassettes/audio_transcription.yml +++ b/spec/cassettes/audio_transcription.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/audiotranscription + uri: https://api.scale.com/v1/task/audiotranscription body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","attachment_type":"audio","attachment":"https://storage.googleapis.com/deepmind-media/pixie/knowing-what-to-say/second-list/speaker-3.wav","verbatim":false}' diff --git a/spec/cassettes/categorization.yml b/spec/cassettes/categorization.yml index 02eca51..f5d559a 100644 --- a/spec/cassettes/categorization.yml +++ b/spec/cassettes/categorization.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/categorization + uri: https://api.scale.com/v1/task/categorization body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Is diff --git a/spec/cassettes/comparison.yml b/spec/cassettes/comparison.yml index 4691109..10644fc 100644 --- a/spec/cassettes/comparison.yml +++ b/spec/cassettes/comparison.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/comparison + uri: https://api.scale.com/v1/task/comparison body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Do diff --git a/spec/cassettes/cuboid_annotation.yml b/spec/cassettes/cuboid_annotation.yml index 7997664..6cf0f31 100644 --- a/spec/cassettes/cuboid_annotation.yml +++ b/spec/cassettes/cuboid_annotation.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/cuboidannotation + uri: https://api.scale.com/v1/task/cuboidannotation body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Draw diff --git a/spec/cassettes/data_collection.yml b/spec/cassettes/data_collection.yml index 539edd1..7173daf 100644 --- a/spec/cassettes/data_collection.yml +++ b/spec/cassettes/data_collection.yml @@ -2,11 +2,11 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/datacollection + uri: https://api.scale.com/v1/task/datacollection body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Find - the URL for the hiring page for the company with attached website.","attachment":"https://www.scaleapi.com/","attachment_type":"website","fields":{"hiring_page":"Hiring + the URL for the hiring page for the company with attached website.","attachment":"https://scale.com/","attachment_type":"website","fields":{"hiring_page":"Hiring Page URL"}}' response: status: @@ -15,7 +15,7 @@ http_interactions: body: encoding: ASCII-8BIT string: '{"task_id":"5c84d0f562e7490079ffae3b","created_at":"2019-03-10T08:55:17.126Z","completed_at":"2019-03-10T08:55:17.173Z","callback_url":"http://www.example.com/callback","type":"datacollection","status":"completed","instruction":"Find - the URL for the hiring page for the company with attached website.","params":{"attachment_type":"website","attachment":"https://www.scaleapi.com/","fields":{"hiring_page":"Hiring + the URL for the hiring page for the company with attached website.","params":{"attachment_type":"website","attachment":"https://scale.com/","fields":{"hiring_page":"Hiring Page URL"}},"is_test":true,"urgency":"standard","metadata":{},"callback_succeeded":true,"processed_attachments":[],"response":{"fields":{"hiring_page":"test response"},"time_spent_in_seconds":15}}' http_version: diff --git a/spec/cassettes/image_recognition.yml b/spec/cassettes/image_recognition.yml index 9e236f1..5258dd9 100644 --- a/spec/cassettes/image_recognition.yml +++ b/spec/cassettes/image_recognition.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/annotation + uri: https://api.scale.com/v1/task/annotation body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Draw diff --git a/spec/cassettes/line_annotation.yml b/spec/cassettes/line_annotation.yml index 20a75a9..2f4ead5 100644 --- a/spec/cassettes/line_annotation.yml +++ b/spec/cassettes/line_annotation.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/lineannotation + uri: https://api.scale.com/v1/task/lineannotation body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Draw diff --git a/spec/cassettes/point_annotation.yml b/spec/cassettes/point_annotation.yml index 63f5e81..c513a6b 100644 --- a/spec/cassettes/point_annotation.yml +++ b/spec/cassettes/point_annotation.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/pointannotation + uri: https://api.scale.com/v1/task/pointannotation body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Draw diff --git a/spec/cassettes/polygon_annotation.yml b/spec/cassettes/polygon_annotation.yml index def3f23..baa3b74 100644 --- a/spec/cassettes/polygon_annotation.yml +++ b/spec/cassettes/polygon_annotation.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/polygonannotation + uri: https://api.scale.com/v1/task/polygonannotation body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Draw diff --git a/spec/cassettes/segment_annotation.yml b/spec/cassettes/segment_annotation.yml index 4286318..8b64904 100644 --- a/spec/cassettes/segment_annotation.yml +++ b/spec/cassettes/segment_annotation.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/segmentannotation + uri: https://api.scale.com/v1/task/segmentannotation body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Please diff --git a/spec/cassettes/task_cancel_invalid.yml b/spec/cassettes/task_cancel_invalid.yml index 06fc939..ad4db58 100644 --- a/spec/cassettes/task_cancel_invalid.yml +++ b/spec/cassettes/task_cancel_invalid.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/invalid_task_id/cancel + uri: https://api.scale.com/v1/task/invalid_task_id/cancel body: encoding: UTF-8 string: '{"callback_url":null}' diff --git a/spec/cassettes/task_cancel_valid.yml b/spec/cassettes/task_cancel_valid.yml index f57f041..9214f9e 100644 --- a/spec/cassettes/task_cancel_valid.yml +++ b/spec/cassettes/task_cancel_valid.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/5c84d0fe958593004f13e5ba/cancel + uri: https://api.scale.com/v1/task/5c84d0fe958593004f13e5ba/cancel body: encoding: US-ASCII string: '{"callback_url":null}' diff --git a/spec/cassettes/task_find_invalid.yml b/spec/cassettes/task_find_invalid.yml index 04f7c53..5090513 100644 --- a/spec/cassettes/task_find_invalid.yml +++ b/spec/cassettes/task_find_invalid.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.scale.ai/v1/task/invalid_task_id?callback_url + uri: https://api.scale.com/v1/task/invalid_task_id?callback_url body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/task_find_valid.yml b/spec/cassettes/task_find_valid.yml index 506e136..3f95ed6 100644 --- a/spec/cassettes/task_find_valid.yml +++ b/spec/cassettes/task_find_valid.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.scale.ai/v1/task/5c84d0fe958593004f13e5ba?callback_url + uri: https://api.scale.com/v1/task/5c84d0fe958593004f13e5ba?callback_url body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/task_list_1.yml b/spec/cassettes/task_list_1.yml index 4c6d57c..bd6803c 100644 --- a/spec/cassettes/task_list_1.yml +++ b/spec/cassettes/task_list_1.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.scale.ai/v1/tasks?callback_url&end_time&limit=2&offset=0&start_time&status&type + uri: https://api.scale.com/v1/tasks?callback_url&end_time&limit=2&offset=0&start_time&status&type body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/task_list_2.yml b/spec/cassettes/task_list_2.yml index 80875ab..3f05017 100644 --- a/spec/cassettes/task_list_2.yml +++ b/spec/cassettes/task_list_2.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.scale.ai/v1/tasks?callback_url&end_time&limit=2&offset=2&start_time&status&type + uri: https://api.scale.com/v1/tasks?callback_url&end_time&limit=2&offset=2&start_time&status&type body: encoding: US-ASCII string: '' diff --git a/spec/cassettes/transcription.yml b/spec/cassettes/transcription.yml index 51c7125..16e22e1 100644 --- a/spec/cassettes/transcription.yml +++ b/spec/cassettes/transcription.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: post - uri: https://api.scale.ai/v1/task/transcription + uri: https://api.scale.com/v1/task/transcription body: encoding: UTF-8 string: '{"callback_url":"http://www.example.com/callback","instruction":"Transcribe diff --git a/spec/lib/api/tasks/data_collection_task_spec.rb b/spec/lib/api/tasks/data_collection_task_spec.rb index a65593d..4d94886 100644 --- a/spec/lib/api/tasks/data_collection_task_spec.rb +++ b/spec/lib/api/tasks/data_collection_task_spec.rb @@ -6,7 +6,7 @@ scale.create_datacollection_task( callback_url: 'http://www.example.com/callback', instruction: 'Find the URL for the hiring page for the company with attached website.', - attachment: 'https://www.scaleapi.com/', + attachment: 'https://scale.com/', attachment_type: 'website', fields: { hiring_page: 'Hiring Page URL'