{"id":16381003,"url":"https://github.com/anthonator/shirtsio","last_synced_at":"2025-03-23T03:33:14.274Z","repository":{"id":8420019,"uuid":"10006590","full_name":"anthonator/shirtsio","owner":"anthonator","description":"A Ruby wrapper for the shirts.io API","archived":false,"fork":false,"pushed_at":"2014-01-11T19:45:14.000Z","size":395,"stargazers_count":13,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T17:24:37.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anthonator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-11T23:15:18.000Z","updated_at":"2023-03-17T12:02:58.000Z","dependencies_parsed_at":"2022-07-30T00:09:38.669Z","dependency_job_id":null,"html_url":"https://github.com/anthonator/shirtsio","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fshirtsio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fshirtsio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fshirtsio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fshirtsio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonator","download_url":"https://codeload.github.com/anthonator/shirtsio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052659,"owners_count":20553162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T03:53:06.624Z","updated_at":"2025-03-23T03:33:13.829Z","avatar_url":"https://github.com/anthonator.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shirtsio [![endorse](http://api.coderwall.com/anthonator/endorsecount.png)](http://coderwall.com/anthonator)\n\nA Ruby wrapper around the shirts.io API\n\n[![Build Status](https://travis-ci.org/anthonator/shirtsio.png?branch=master)](https://travis-ci.org/anthonator/shirtsio) [![Code Climate](https://codeclimate.com/github/anthonator/shirtsio.png)](https://codeclimate.com/github/anthonator/shirtsio) [![Coverage Status](https://coveralls.io/repos/anthonator/shirtsio/badge.png?branch=master)](https://coveralls.io/r/anthonator/shirtsio?branch=master)\n\n## Documentation\n\nYou can view detailed documentation of this library at http://rdoc.info/github/anthonator/shirtsio/frames. We try to make sure that our documentation is up-to-date and thorough. However, we do recommend keeping the [shirts.io API documentation](https://www.shirts.io/docs/overview/) handy.\n\nIf you find any discrepency in our documentation please [file an issue](https://github.com/anthonator/shirtsio/issues).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'shirtsio'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install shirtsio\n\n## Quick Start Guide\n\nBefore you can start ordering some sweet shirts you'll need to tell shirts.io who you are.\n\nGrab your super secret API key from the [shirts.io dashboard](https://www.shirts.io/accounts/dashboard/).\n\nSprinkle some pixie-dust...\n\n```ruby\nShirtsio.configure do |config|\n  config.api_key = YOUR_API_KEY\nend\n```\n\nBAM! Print some shirts!\n\n```ruby\nShirtsio::Order.create do |order|\n  ...\nend\n```\n\n## Product API\n\n```ruby\n# Return details about a specific product\nproduct = Shirtsio::Product.find(3)\n\n# Return a list of categories\ncategories = Shirtsio::Product::Category.list\n\n# Return a list of products for a specific category\nproducts = categories[0].products\n\n# Since shirts.io doesn't return full product data when requesting from a category, return it now\nproduct = products[0].full_product\n```\n\n## Quote API\n\n```ruby\n# Assembling the parameters necessary to generate a quote is messy\n# business. Luckily there's a DSL for that.\nquote = Shirtsio::Quote.create do |quote|\n  quote.print_type 'Digital Print'\n  quote.garment do |garment|\n    garment.product_id 3\n    garment.color 'Black'\n    garment.sizes do |size|\n      size.med 1\n    end\n  end\n  quote.print do |print|\n    print.front do |front|\n      front.color_count 1\n      front.colors ['Black']\n    end\n    print.back do |back|\n      back.color_count 1\n      back.colors ['Black']\n    end\n  end\nend\n```\n\n## Order API\n```ruby\n# Yep, there's one for orders too\norder = Shirtsio::Order.create do |order|\n  order.test true\n  order.price 18.99\n  order.print_type 'Digital Print'\n  order.extra_screens 'None'\n  order.ship_type 'Standard'\n  order.garment do |garment|\n    garment.product_id 3\n    garment.color 'Black'\n    garment.sizes do |size|\n      size.med 1\n    end\n  end\n  order.print do |print|\n    print.front do |front|\n      front.artwork File.new('/path/to/file.png')\n      front.proof File.new('/path/to/file.jpg')\n      front.color_count 1\n      front.colors ['Black']\n      front.dimensions '5.0 inches wide'\n      front.placement '4.0 inches below bottom of collar'\n    end\n  end\n  order.personalization do |personalization|\n    personalization.size 'med'\n    personalization.batch 1\n    personalization.number 1\n    personalization.number_size 2\n    personalization.name 'Bob'\n    personalization.name_size 1\n  end\n  order.addresses do |address|\n    address.name 'Bob'\n    address.company 'Sticksnleaves'\n    address.address '1234 Hopes and Dreams Ln.'\n    address.address2 'Apt. \u003c3'\n    address.city 'Indianapolis'\n    address.state 'IN'\n    address.country 'US'\n    address.batch 1\n    address.sizes do |size|\n      size.med 1\n    end\n  end\nend\n```\n\n## Status API\n```ruby\n# Get an order's status\nstatus = Shirtsio::Status.find(1234)\n\n# Register a status webhook\nShirtsio::Status::Webhook.create('http://www.example.com') #returns true or false\n\n# List webhooks\nwebhooks = Shirtsio::Status::Webhook.list\n\n# Delete a webhook\nShirtsio::Status::Webhook.delete('http://www.example.com')\n# or\nwebhooks[0].delete\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## Credits\n\n[![Sticksnleaves](http://sticksnleaves-wordpress.herokuapp.com/wp-content/themes/sticksnleaves/images/snl-logo-116x116.png)](http://www.sticksnleaves.com)\n\nShirtsio is maintained and funded by [Sticksnleaves](http://www.sticksnleaves.com)\n\nThanks to all of our [contributors](https://github.com/anthonator/shirtsio/graphs/contributors)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonator%2Fshirtsio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonator%2Fshirtsio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonator%2Fshirtsio/lists"}