Created
July 1, 2014 22:48
-
-
Save nickjacob/5d9b0ab5fe95ad1af717 to your computer and use it in GitHub Desktop.
image moderation example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'crowdmoderation' | |
API_KEY = "your_api_key" | |
DOMAIN_BASE = "https://api.crowdmoderation.net" | |
job_id = "your_job_id" | |
CrowdModeration::Job.connect! API_KEY, DOMAIN_BASE | |
job = CrowdModeration::Job.new(job_id) | |
unit = CrowdModeration::Unit.new(job) | |
# you can only moderate images already at a public URL | |
unit.create({:image_name => "my_image", :image_url => "http://mysite.co/alread-uploaded.jpg"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment