0.0
No commit activity in last 3 years
No release in over 3 years
Shopify URL allows you to build URLs to Shopify stores and the Admin site that can be used as links
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0
~> 3.0
 Project Readme

Shopify URL

Build Status

Build URLs to Shopify web pages.

Usage

Admin URLs

require "shopify_url"

url = ShopifyURL::Admin.new("shopname")

# https://shopname.myshopify.com/admin"
url.to_s

# https://shopname.myshopify.com/admin/orders
url.orders

# https://shopname.myshopify.com/admin/orders/6303508996
url.order(6303508996)

# https://shopname.myshopify.com/admin/products
url.products

# https://shopname.myshopify.com/admin/products/345323423
url.product(345323423)

# https://shopname.myshopify.com/admin/products/345323423/variants/2421342331
url.product(345323423).variant(2421342331)

See the RDocs for a complete list of methods.

Store URLs

require "shopify_url"

url = ShopifyURL::Store.new("shopname")  # can also be the site's top-level domain

# https://shopname.myshopify.com/collections
url.collections

# https://shopname.myshopify.com/collections/amaaaaazing-thangz
url.collection("amaaaaazing-thangz")

See the RDocs for a complete list of methods.

Query String Parameters

All Shopify URL generation methods accept a Hash of query string parameters:

url = ShopifyURL::Store.new("shopname")  # can also be the site's top-level domain

# https://shopname.myshopify.com/products/some-handle?tracking=data
url.products("some-handle", :tracking => "data")

License

The gem is available as open source under the terms of the MIT License.


Made by ScreenStaring