diff --git a/README.md b/README.md index 1f94cd0..1826ae6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ # In-app purchase extension for Defold -This is a Defold [native extension](https://www.defold.com/manuals/extensions/) which provides access to In-app purchase functionality on iOS, Android (Google Play and Amazon) and Facebook Canvas platforms. +Defold [native extension](https://www.defold.com/manuals/extensions/) which provides access to In-app purchase functionality on iOS, Android (Google Play and Amazon) and Facebook Canvas platforms. -To learn more please visit the [documentation page](https://defold.github.io/extension-iap/) for this extension. +## API and installation +[API and setup instructions](https://defold.github.io/extension-iap). -[The manual](https://defold.com/manuals/iap/) is available on the official Defold site. - ---- - -If you have any issues, questions or suggestions please [create an issue](https://github.com/defold/extension-iap/issues). +## Manual +[The manual](https://www.defold.com/manuals/iap/) is available on the official Defold site. diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 37f5eaa..0000000 --- a/docs/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gem 'github-pages', group: :jekyll_plugins diff --git a/docs/_config.yml b/docs/_config.yml index 2ca3fd3..aeb2270 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1 +1 @@ -title: "extension-iap" +title: "extension-gpgs" diff --git a/docs/_includes/api_ref.md b/docs/_includes/api_ref.md new file mode 100644 index 0000000..dcce1ff --- /dev/null +++ b/docs/_includes/api_ref.md @@ -0,0 +1,112 @@ +## Modules +{% for item in site.data.api %} +### {{ item.name }} +{{ item.desc }} +{% endfor %} + +## Enums + + +{% for module in site.data.api %} + {% for item in module.members %} + {% if item.type contains 'number' %} + + + + + + {% endif %} + {% endfor %} +{% endfor %} + +
{{ module.name }}.{{ item.name }}{{ item.desc | markdownify | replace: "[icon:attention]","

⚠️"}}
+ +
+ +## Functions + + +{% for module in site.data.api %} + {% for item in module.members %} + {% if item.type contains 'function' %} + + + + + {% endif %} + {% endfor %} +{% endfor %} + +
{{ module.name }}.{{ item.name }}(){{ item.desc | truncate: 80 }}
+ +{% for module in site.data.api %} + {% for function in module.members %} + {% if function.type contains 'function' %} +
+

{{ module.name }}.{{ function.name }}({% for param in function.parameters %}{{param.name}}{% unless forloop.last %}, {% endunless %}{% endfor %})

+{% if function.parameters %} + + + + + + + + + + {% for param in function.parameters %} + + + + + + {% endfor %} + +
ParameterTypeDescription
+ {{ param.name }} + {% if param.optional %} + (optional) + {% endif %} + {{ param.type }}{{ param.desc | markdownify }} + {% if param.type == "function" %} + {% include type-function.md params=param.parameters %} + {% endif %} + {% if param.type == "table" %} + {% include type-table.md fields=param.members %} + {% endif %} +
+{% endif %} +{% if function.returns %} + + + + + + + + + +

Returns

+ {% for return in function.returns %} + + + + + + {% endfor %} + +
Return valueTypeDescription
{{ return.name }}{{ return.type }}{{ return.desc | markdownify }}
+{% endif %} +{{ function.desc | markdownify | replace: "[icon:attention]","

⚠️" | replace: "[type:string]","string" | replace: "[type:number]","number" | replace: "[type:table]","table" | markdownify}} + +{% if function.examples %} +

Examples

+{% for example in function.examples %} +{{ example.desc | markdownify }} +{% endfor %} +{% endif %} +
+ + {% endif %} + {% endfor %} +{% endfor %} diff --git a/docs/_includes/description.md b/docs/_includes/description.md deleted file mode 100644 index bf81741..0000000 --- a/docs/_includes/description.md +++ /dev/null @@ -1,38 +0,0 @@ -{% assign truncate = 10000 %} -{% if include.truncate %} - {% assign truncate = include.truncate %} -{% endif %} -{{ include.desc - | truncate: truncate - | replace: "[type:string]","string" - | replace: "[type:number]","number" - | replace: "[type:table]","table" - | replace: "[icon:attention]","

" - | replace: "[icon:android]", "" - | replace: "[icon:gameroom]", "" - | replace: "[icon:apple]", "" - | replace: "[icon:clipboard]", "" - | replace: "[icon:king]", "" - | replace: "[icon:defold]", "" - | replace: "[icon:search]", "" - | replace: "[icon:link-ext]", "" - | replace: "[icon:link]", "" - | replace: "[icon:amazon]", "" - | replace: "[icon:html5]", "" - | replace: "[icon:ios]", "" - | replace: "[icon:linux]", "" - | replace: "[icon:windows]", "" - | replace: "[icon:macos]", "" - | replace: "[icon:clock]", "" - | replace: "[icon:star]", "" - | replace: "[icon:googleplay]", "" - | replace: "[icon:dropbox]", "" - | replace: "[icon:twitter]", "" - | replace: "[icon:slack]", "" - | replace: "[icon:instagram]", "" - | replace: "[icon:steam]", "" - | replace: "[icon:github]", "" - | replace: "[icon:facebook]", "" - - | markdownify -}} \ No newline at end of file diff --git a/docs/_includes/type-function.md b/docs/_includes/type-function.md index afc51be..6fb42f6 100644 --- a/docs/_includes/type-function.md +++ b/docs/_includes/type-function.md @@ -11,7 +11,7 @@ {{ param.name }} {{ param.type }} - {% include description.md desc=param.desc %} + {{ param.desc | markdownify }} {% if param.type == "table" %} {% include type-table.md fields=param.members %} diff --git a/docs/_includes/type-table.md b/docs/_includes/type-table.md index 5905214..fc66a97 100644 --- a/docs/_includes/type-table.md +++ b/docs/_includes/type-table.md @@ -5,7 +5,7 @@ {% if field.optional %} (optional) {% endif %} - {{ field.type }} - {% include description.md desc=field.desc %} + {{ field.type }} - {{ field.desc | markdownify }} {% endfor %} diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index c118ad6..0255072 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -4,9 +4,9 @@ - - - + + + @@ -14,24 +14,8 @@
-
-

Defold In-app purchase extension API documentation

-

Functions and constants for doing in-app purchase. Supported on iOS, Android (Google Play and Amazon) and Facebook Canvas.

- -

To use this library in your Defold project, add the following URL to your game.project dependencies: -

https://github.com/defold/extension-iap/archive/master.zip
-

- -

We recommend using a link to a zip file of a specific release.

- -

The source code can be viewed at: https://github.com/defold/extension-iap

- -
-
- {{ content }} -
diff --git a/docs/fonts.css b/docs/css/fonts.css similarity index 83% rename from docs/fonts.css rename to docs/css/fonts.css index 1230c7f..bdf2563 100644 --- a/docs/fonts.css +++ b/docs/css/fonts.css @@ -53,15 +53,3 @@ url('fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'), url('fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg'); } - -@font-face { - font-family: fontello; - font-weight: 400; - font-style: normal; - src: url(fonts/fontello/fontello_ef8859ce.eot); - src: url(fonts/fontello/fontello_ef8859ce.eot#iefix) format("embedded-opentype"), - url(fonts/fontello/fontello_248ab5dd.woff2) format("woff2"), - url(fonts/fontello/fontello_b6287553.woff) format("woff"), - url(fonts/fontello/fontello_df5eac8f.ttf) format("truetype"), - url(fonts/fontello/fontello_793be834.svg#fontello) format("svg"); -} diff --git a/docs/rouge.css b/docs/css/rouge.css similarity index 56% rename from docs/rouge.css rename to docs/css/rouge.css index c8b3266..daf76ad 100644 --- a/docs/rouge.css +++ b/docs/css/rouge.css @@ -207,136 +207,3 @@ .highlight { background-color: #f8f8f8; } - -.icon-amazon:before, .icon-android:before, .icon-apple:before, -.icon-attention:before, .icon-clipboard:before, .icon-clock:before, -.icon-defold:before, .icon-dropbox:before, .icon-facebook:before, -.icon-gameroom:before, .icon-github:before, .icon-googleplay:before, -.icon-html5:before, .icon-instagram:before, .icon-ios:before, .icon-king:before, -.icon-link-ext:before, .icon-link:before, .icon-linux:before, .icon-macos:before, -.icon-search:before, .icon-slack:before, .icon-star:before, .icon-steam:before, -.icon-twitter:before, .icon-windows:before { - font-family: fontello; - font-style: normal; - font-weight: 400; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; - font-variant: normal; - text-transform: none; - line-height: 1em; - margin-left: .2em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale -} - -.icon-gameroom:before { - content: "\E800" -} - -.icon-apple:before { - content: "\E809" -} - -.icon-clipboard:before { - content: "\E819" -} - -.icon-king:before { - content: "\E858" -} - -.icon-defold:before { - content: "\E859" -} - -.icon-search:before { - content: "\E86A" -} - -.icon-link-ext:before { - content: "\E86F" -} - -.icon-link:before { - content: "\E870" -} - -.icon-attention:before { - content: "\E871"; - color:#ffa500; -} - -.icon-amazon:before { - content: "\E872" -} - -.icon-android:before { - content: "\E873"; - color: #A4C639; -} - -.icon-html5:before { - content: "\E875"; - color:#f16529; -} - -.icon-ios:before { - content: "\E876"; - color:#147efb; -} - -.icon-linux:before { - content: "\E877" -} - -.icon-windows:before { - content: "\E878" -} - -.icon-macos:before { - content: "\E87A" -} - -.icon-clock:before { - content: "\E87B" -} - -.icon-star:before { - content: "\E87C" -} - -.icon-googleplay:before { - content: "\E87D" -} - -.icon-dropbox:before { - content: "\E87F" -} - -.icon-twitter:before { - content: "\E881" -} - -.icon-slack:before { - content: "\E883" -} - -.icon-instagram:before { - content: "\E884" -} - -.icon-steam:before { - content: "\E885" -} - -.icon-github:before { - content: "\E886" -} - -.icon-facebook:before { - content: "\E887" -} diff --git a/docs/style.css b/docs/css/style.css similarity index 100% rename from docs/style.css rename to docs/css/style.css diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.eot b/docs/fonts/Noto-Sans-700/Noto-Sans-700.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.svg b/docs/fonts/Noto-Sans-700/Noto-Sans-700.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.ttf b/docs/fonts/Noto-Sans-700/Noto-Sans-700.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff b/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff2 b/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2 b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.eot b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.svg b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.ttf b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff2 b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.eot b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.svg b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.ttf b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff2 b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/fontello/fontello_248ab5dd.woff2 b/docs/fonts/fontello/fontello_248ab5dd.woff2 deleted file mode 100644 index 27685c9..0000000 Binary files a/docs/fonts/fontello/fontello_248ab5dd.woff2 and /dev/null differ diff --git a/docs/fonts/fontello/fontello_793be834.svg b/docs/fonts/fontello/fontello_793be834.svg deleted file mode 100644 index e2a9d96..0000000 --- a/docs/fonts/fontello/fontello_793be834.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - -Copyright (C) 2018 by original authors @ fontello.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/fontello/fontello_b6287553.woff b/docs/fonts/fontello/fontello_b6287553.woff deleted file mode 100644 index 82c9dd9..0000000 Binary files a/docs/fonts/fontello/fontello_b6287553.woff and /dev/null differ diff --git a/docs/fonts/fontello/fontello_df5eac8f.ttf b/docs/fonts/fontello/fontello_df5eac8f.ttf deleted file mode 100644 index b5d9d9a..0000000 Binary files a/docs/fonts/fontello/fontello_df5eac8f.ttf and /dev/null differ diff --git a/docs/fonts/fontello/fontello_ef8859ce.eot b/docs/fonts/fontello/fontello_ef8859ce.eot deleted file mode 100644 index 7700a31..0000000 Binary files a/docs/fonts/fontello/fontello_ef8859ce.eot and /dev/null differ diff --git a/docs/index.md b/docs/index.md index 85ec5ad..b9fda60 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,121 +1,23 @@ --- layout: default --- -## Modules -{% for item in site.data.api %} -### {{ item.name }} -{% include description.md desc=item.desc %} -{% endfor %} -
+# Defold In-app purchase extension API documentation -## Enums - - -{% for module in site.data.api %} - {% for item in module.members %} - {% if item.type contains 'number' %} - - - - +This extension provides functions for making in-app purchases. Supported on iOS, Android (Google Play and Amazon) and Facebook Canvas. - {% endif %} - {% endfor %} -{% endfor %} - -
{{ module.name }}.{{ item.name }}{{ item.desc | markdownify | replace: "[icon:attention]","

⚠️"}}
+# Usage +To use this library in your Defold project, add the following URL to your game.project dependencies: -
+ https://github.com/defold/extension-iap/archive/master.zip -## Functions - - -{% for module in site.data.api %} - {% for item in module.members %} - {% if item.type contains 'function' %} - - - - - {% endif %} - {% endfor %} -{% endfor %} - -
{{ module.name }}.{{ item.name }}(){% include description.md desc=item.desc %}
+We recommend using a link to a zip file of a [https://github.com/defold/extension-v/releases](specific release). -{% for module in site.data.api %} - {% for function in module.members %} - {% if function.type contains 'function' %} -
-

{{ module.name }}.{{ function.name }}({% for param in function.parameters %}{{param.name}}{% unless forloop.last %}, {% endunless %}{% endfor %})

-{% include description.md desc=function.desc %} -{% if function.parameters %} - - - - - - - - - - {% for param in function.parameters %} - - - - - - {% endfor %} - -
ParameterTypeDescription
- {{ param.name }} - {% if param.optional %} - (optional) - {% endif %} - {{ param.type }}{% include description.md desc=param.desc %} - {% if param.type == "function" %} - {% include type-function.md params=param.parameters %} - {% endif %} - {% if param.type == "table" %} - {% include type-table.md fields=param.members %} - {% endif %} -
-{% endif %} -{% if function.returns %} - - - - - - - - - -

Returns

- {% for return in function.returns %} - - - - - - {% endfor %} - -
Return valueTypeDescription
{{ return.name }}{{ return.type }}{% include description.md desc=return.desc %} - {% if return.type == "table" %} - {% include type-table.md fields=return.members %} - {% endif %} -
-{% endif %} +## Source code -{% if function.examples %} -

Examples

-{% for example in function.examples %} -{{ example.desc | markdownify }} -{% endfor %} -{% endif %} -
+The source code is available on [GitHub](https://github.com/defold/extension-v) - {% endif %} - {% endfor %} -{% endfor %} + +# API reference + +{% include api_ref.md %}