Skip to content

Commit

Permalink
add Icons
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerroan authored and remear committed Feb 10, 2022
1 parent 4865daa commit 5b736b2
Show file tree
Hide file tree
Showing 12 changed files with 478 additions and 132 deletions.
2 changes: 1 addition & 1 deletion api/reference/1.0/app_configurations/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ labels:

{% labels %}

Retrieve the App Configurations owned by the specified Company.
Retrieve the App Configurations owned by the specified Company. Icons can be included with a query parameter `?include=icon`

{% filters app_configuration %}

Expand Down
147 changes: 147 additions & 0 deletions api/reference/1.0/app_configurations/relationships/icon/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
title: Create
labels:
- unstable
---

# Create an Icon for an AppConfiguration

{% labels %}

Icons are processed asynchronously and have a `status` attribute representing the current status of the Icon.

{% alert info, Note %}
This endpoint expects multipart requests. Icons must be 4 Mb or less.
{% endalert %}

<div class="spectrum-Accordion" role="region">
<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Attributes</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="spectrum-Table" role="grid">
<div class="spectrum-Table-head" style="display: flex" role="row">
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Field
</div>
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Type
</div>
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Required / Optional
</div>
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Description
</div>
</div>

<div class="spectrum-Table-body" role="rowgroup">
<div class="spectrum-Table-row" style="display: flex" role="row">
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
<code>file</code>
</div>
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
ico, png, jpg, jpeg
</div>
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
required
</div>
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
The icon image
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="spectrum-Accordion" role="region">
<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Endpoint Definition</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="highlight">
<pre><code>POST app_configurations/:app_configuration_id/icon</code></pre>
</div>
</div>
</div>

<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Example Request</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="highlight">
<pre><code>curl https://reactor.adobe.io/app_configurations/:app_configuration_id/icon <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Accept: application/vnd.api+json;revision=1"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Content-Type: multipart/form-data"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Authorization: Bearer [TOKEN]"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"X-Api-Key: [KEY]"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"X-Gw-Ims-Org-Id: [ORG_ID]"</span> <span class="se">\</span>
<span class="nt">-F</span> <span class="s2">"file"="@[PATH]"</span> <span class="se"></span>
</code></pre>
</div>
</div>
</div>

<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Example Response</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="highlight">
<em>202 Accepted</em>
<pre><code><span class="p">{</span><span class="w"></span>
<span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ICd1de2829fd4743c5bc45b98d9d01a396"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"icons"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"attributes"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span>
<span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="kc">"https://assets.adobedtm.com/icons/17e0df72ece8/ICd1de2829fd4743c5bc45b98d9d01a396.png"</span><span class="p">,</span><span class="w"> </span>
<span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"pending"</span><span class="p">,</span><span class="w"> </span>
<span class="nt">"created_at"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2022-02-04T21:14:23.483Z"</span><span class="p">,</span><span class="w"> </span>
<span class="nt">"updated_at"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2022-02-04T21:14:23.483Z"</span><span class="w"></span>
<span class="p">},</span><span class="w"></span>
<span class="nt">"relationships"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"resource"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"links"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"related"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://reactor.adobe.io/app_configurations/AC082ee39971a9444fb133e7610ae1e9f7"</span><span class="w"></span>
<span class="p">},</span><span class="w"></span>
<span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"AC082ee39971a9444fb133e7610ae1e9f7"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"app_configurations"</span><span class="p"></span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">},</span><span class="w"></span>
<span class="nt">"links"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"resource"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://reactor.adobe.io/app_configurations/AC082ee39971a9444fb133e7610ae1e9f7"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"self"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://reactor.adobe.io/icons/ICd1de2829fd4743c5bc45b98d9d01a396"</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w">
</span><span class="p">}</span></code></pre>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Fetch related
labels:
- unstable
---

# Fetch the related Icon

{% labels %}

Retrieve the AppConfiguration's Icon

{% scenario app_configuration_relationship_icon.show icons.get_the_icon_for_an_app_configuration %}
2 changes: 1 addition & 1 deletion api/reference/1.0/app_surfaces/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ labels:

{% labels %}

Retrieve the App Surfaces owned by the specified Company.
Retrieve the App Surfaces owned by the specified Company. Icons can be included with a query parameter `?include=icon`

{% scenario app_surfaces.index %}
147 changes: 147 additions & 0 deletions api/reference/1.0/app_surfaces/relationships/icon/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
title: Create
labels:
- unstable
---

# Create an Icon for an AppSurface

{% labels %}

Icons are processed asynchronously and have a `status` attribute representing the current status of the Icon.

{% alert info, Note %}
This endpoint expects multipart requests. Icons must be 4 Mb or less.
{% endalert %}

<div class="spectrum-Accordion" role="region">
<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Attributes</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="spectrum-Table" role="grid">
<div class="spectrum-Table-head" style="display: flex" role="row">
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Field
</div>
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Type
</div>
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Required / Optional
</div>
<div class="spectrum-Table-headCell" style="flex: 1" role="columnheader">
Description
</div>
</div>

<div class="spectrum-Table-body" role="rowgroup">
<div class="spectrum-Table-row" style="display: flex" role="row">
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
<code>file</code>
</div>
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
ico, png, jpg, jpeg
</div>
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
required
</div>
<div class="spectrum-Table-cell" style="flex: 1" role="gridcell">
The icon image
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="spectrum-Accordion" role="region">
<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Endpoint Definition</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="highlight">
<pre><code>POST app_surfaces/:app_surface_id/icon</code></pre>
</div>
</div>
</div>

<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Example Request</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="highlight">
<pre><code>curl https://reactor.adobe.io/app_surfaces/:app_surface_id/icon <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Accept: application/vnd.api+json;revision=1"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Content-Type: multipart/form-data"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Authorization: Bearer [TOKEN]"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"X-Api-Key: [KEY]"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"X-Gw-Ims-Org-Id: [ORG_ID]"</span> <span class="se">\</span>
<span class="nt">-F</span> <span class="s2">"file"="@[PATH]"</span> <span class="se"></span>
</code></pre>
</div>
</div>
</div>

<div class="spectrum-Accordion-item is-open" role="presentation">

<h3 class="spectrum-Accordion-itemHeading no-anchor">
<button class="spectrum-Accordion-itemHeader" type="button" onClick="toggleAccordion(this)" aria-expanded="true">Example Response</button>
<svg class="spectrum-Icon spectrum-UIIcon-ChevronRightMedium spectrum-Accordion-itemIndicator" focusable="false" aria-hidden="true">
<use xlink:href="#spectrum-css-icon-ChevronRightMedium" />
</svg>
</h3>

<div class="spectrum-Accordion-itemContent" role="region">
<div class="highlight">
<em>202 Accepted</em>
<pre><code><span class="p">{</span><span class="w"></span>
<span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ICf76b9de5b229435bb76802427a88464b"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"icons"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"attributes"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span>
<span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="kc">"https://assets.adobedtm.com/icons/17e0df72ece8/ICf76b9de5b229435bb76802427a88464b.png"</span><span class="p">,</span><span class="w"> </span>
<span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"pending"</span><span class="p">,</span><span class="w"> </span>
<span class="nt">"created_at"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2022-02-04T21:14:23.483Z"</span><span class="p">,</span><span class="w"> </span>
<span class="nt">"updated_at"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2022-02-04T21:14:23.483Z"</span><span class="w"></span>
<span class="p">},</span><span class="w"></span>
<span class="nt">"relationships"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"resource"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"links"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"related"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://reactor.adobe.io/app_surfaces/ASb763e208e4f64c86a4ce6445604355ce"</span><span class="w"></span>
<span class="p">},</span><span class="w"></span>
<span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ASb763e208e4f64c86a4ce6445604355ce"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"app_surfaces"</span><span class="p"></span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">},</span><span class="w"></span>
<span class="nt">"links"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="nt">"resource"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://reactor.adobe.io/app_surfaces/ASb763e208e4f64c86a4ce6445604355ce"</span><span class="p">,</span><span class="w"></span>
<span class="nt">"self"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://reactor.adobe.io/icons/ICf76b9de5b229435bb76802427a88464b"</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w">
</span><span class="p">}</span></code></pre>
</div>
</div>
</div>
</div>
13 changes: 13 additions & 0 deletions api/reference/1.0/app_surfaces/relationships/icon/fetch_related.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Fetch related
labels:
- unstable
---

# Fetch the related Icon

{% labels %}

Retrieve the AppSurface's Icon

{% scenario app_surface_relationship_icon.show icons.get_the_icon_for_an_app_surface %}
Loading

0 comments on commit 5b736b2

Please sign in to comment.