From e81aec7a77b815e837ada125d5e9b563f7e33a41 Mon Sep 17 00:00:00 2001 From: Maxim Khailo Date: Mon, 15 May 2017 15:31:49 -0700 Subject: [PATCH] Adding support for login in api docs. Requires https://github.com/FoxComm/aglio-theme-fox/pull/1 --- developer-portal/Makefile | 4 + developer-portal/content/home.md | 211 ++++++++++++++++++++++++++++++ developer-portal/content/index.md | 197 +--------------------------- 3 files changed, 218 insertions(+), 194 deletions(-) create mode 100644 developer-portal/content/home.md diff --git a/developer-portal/Makefile b/developer-portal/Makefile index 15d6a10a06..364770fee3 100644 --- a/developer-portal/Makefile +++ b/developer-portal/Makefile @@ -11,6 +11,7 @@ clean: prep: npm install cd node_modules/aglio-theme-fox && npm install + rsync -av node_modules/aglio-theme-fox/templates/assets/ content/assets/ build: $(call header, Building) @@ -36,4 +37,7 @@ publish: build firebase use production firebase deploy +serve: build + firebase serve + .PHONY: prep clean build test docker docker-push publish diff --git a/developer-portal/content/home.md b/developer-portal/content/home.md new file mode 100644 index 0000000000..873418da75 --- /dev/null +++ b/developer-portal/content/home.md @@ -0,0 +1,211 @@ +--- row + +<<< left +# Welcome + +Welcome to FoxCommerce! The Fox Platform is a large and diverse set of modern services +that allow you create next generation commerce experiences. + +<<< + +>>> right + +#### API Reference Quick Links +::: note +[Authentication](reference/index.html#header-authentication) +::: +::: note +[Errors](reference/index.html#header-errors) +::: +::: note +[API.js](https://github.com/FoxComm/api-js) +::: + +>>> + +--- + +--- row +<<< left +# [API Reference](reference/index.html) +See the API Reference for detailed information or the guides below for a tour +of FoxCommerce features. +<<< + +--- + +--- row + +<<< left +# Guides +## [Customers/Checkout Guide](customers/index.html) +Learn about customer accounts, registration, and checkout. + + +<<< + +>>> right + +

+#### Registering a User + +Signup will register a user and return the user information and a JWT authorization token. + +``` javascript +var fox = new FoxApi(); +fox.auth.signup('john@doe.com', 'John Doe', 'password') + .then(({jwt, customer}) => { + fox.addAuth(jwt); + //customers can also be guests. + }); +``` +>>> + +--- + +--- row + +<<< left + +## [Orders Guide](orders/index.html) +Learn how to manage orders and process orders. + + + +<<< + +>>> right + +

+#### Getting An Order + +``` javascript +fox.orders.get('BR42443').then((resp) => { + var order = resp.result; + var referenceNumber = order.referenceNumber; + //orders are read only except order state. +}); +``` +>>> + +--- + +--- row + +<<< left +## [Products Guide](products/index.html) +Learn about products, variants, and SKUs. + + +<<< + +>>> right + +

+#### Getting a Product + +Along with the product id, you must specify which view you want. + +``` javascript +fox.products.one('default',1343).then( (product) => { + var title = product.attributes.title; + //attributes are typed and customizable. +}); +``` +>>> + +--- + +--- row + +<<< left +## [Inventory Guide](inventory/index.html) + +Learn about how to track inventory and make products available to customers. + + +<<< + +--- + +--- row + +<<< left +## [Search Guide](search/index.html) + +Learn about searching products, customers, and orders. Learn how to create +search queries using the query language. + + +<<< + +--- + +--- row + +<<< left +## [Merchandising Guide](merchandising/index.html) + +Learn about offering discounts and promotions to your customers to increase conversion. + + +<<< + +--- + +--- row + +<<< left + +## [Personalization Guide](personalization/index.html) + +Product recommendations, targeted messaging, and product reviews. + + + +<<< + +--- + +--- row + +<<< left + +## [Events Guide](events/index.html) + +Understand and react to what is happening in the system. + + + +<<< + +--- + +--- row + +<<< left + +## [Extending Guide](extending/index.html) + +Extending the storefront and back office. + + + +<<< + +--- + +--- row + +<<< left +## [Channels Guide](channels/index.html) + +Learn about selling your products on amazon and managing orders. + + + +<<< + +--- + + diff --git a/developer-portal/content/index.md b/developer-portal/content/index.md index 873418da75..834408219f 100644 --- a/developer-portal/content/index.md +++ b/developer-portal/content/index.md @@ -1,3 +1,4 @@ + --- row <<< left @@ -10,202 +11,10 @@ that allow you create next generation commerce experiences. >>> right -#### API Reference Quick Links -::: note -[Authentication](reference/index.html#header-authentication) -::: -::: note -[Errors](reference/index.html#header-errors) -::: -::: note -[API.js](https://github.com/FoxComm/api-js) -::: - +# Please Sign In +
>>> --- ---- row -<<< left -# [API Reference](reference/index.html) -See the API Reference for detailed information or the guides below for a tour -of FoxCommerce features. -<<< - ---- - ---- row - -<<< left -# Guides -## [Customers/Checkout Guide](customers/index.html) -Learn about customer accounts, registration, and checkout. - - -<<< - ->>> right - -

-#### Registering a User - -Signup will register a user and return the user information and a JWT authorization token. - -``` javascript -var fox = new FoxApi(); -fox.auth.signup('john@doe.com', 'John Doe', 'password') - .then(({jwt, customer}) => { - fox.addAuth(jwt); - //customers can also be guests. - }); -``` ->>> - ---- - ---- row - -<<< left - -## [Orders Guide](orders/index.html) -Learn how to manage orders and process orders. - - - -<<< - ->>> right - -

-#### Getting An Order - -``` javascript -fox.orders.get('BR42443').then((resp) => { - var order = resp.result; - var referenceNumber = order.referenceNumber; - //orders are read only except order state. -}); -``` ->>> - ---- - ---- row - -<<< left -## [Products Guide](products/index.html) -Learn about products, variants, and SKUs. - - -<<< - ->>> right - -

-#### Getting a Product - -Along with the product id, you must specify which view you want. - -``` javascript -fox.products.one('default',1343).then( (product) => { - var title = product.attributes.title; - //attributes are typed and customizable. -}); -``` ->>> - ---- - ---- row - -<<< left -## [Inventory Guide](inventory/index.html) - -Learn about how to track inventory and make products available to customers. - - -<<< - ---- - ---- row - -<<< left -## [Search Guide](search/index.html) - -Learn about searching products, customers, and orders. Learn how to create -search queries using the query language. - - -<<< - ---- - ---- row - -<<< left -## [Merchandising Guide](merchandising/index.html) - -Learn about offering discounts and promotions to your customers to increase conversion. - - -<<< - ---- - ---- row - -<<< left - -## [Personalization Guide](personalization/index.html) - -Product recommendations, targeted messaging, and product reviews. - - - -<<< - ---- - ---- row - -<<< left - -## [Events Guide](events/index.html) - -Understand and react to what is happening in the system. - - - -<<< - ---- - ---- row - -<<< left - -## [Extending Guide](extending/index.html) - -Extending the storefront and back office. - - - -<<< - ---- - ---- row - -<<< left -## [Channels Guide](channels/index.html) - -Learn about selling your products on amazon and managing orders. - - - -<<< - ---- -