エンドポイント
ストア公開ガイド
アプリがGoogle PlayとApp Storeに出すためにまだ必要なものと、その手順を順番に説明します。
https://www.setherion.com/api/v1/projects/{id}/storeプラン: すべてのプラン
エディターの「Publish to app stores」ウィンドウの内容を、データとして取得できます。ストアに出すために何が整っているかが分かり、wayを指定すると、AndroidとiPhoneの手順が順番に返ります。ウィンドウと同じ仕組みでアプリの保存済みコードを読むので、ウィンドウと内容が食い違うことはありません。
無料で、クレジットは使いません。閲覧者のアクセス権があれば十分です。ウィンドウの使い方と全体の手順は、アプリストアへの公開をご覧ください。
リクエスト
wayなしで、まず2つの方法を比べます。
curl https://www.setherion.com/api/v1/projects/7c1e4a52-9b0d-4f3e-8a61-2d5f0c9e7b14/store \
-H "Authorization: Bearer $SETHERION_API_KEY"wayを付けると、手順が返ります。
curl "https://www.setherion.com/api/v1/projects/7c1e4a52-9b0d-4f3e-8a61-2d5f0c9e7b14/store?way=easy" \
-H "Authorization: Bearer $SETHERION_API_KEY"| パラメーター | 意味 |
|---|---|
way | 任意です。easyまたはnativeを指定します。easyは、公開済みのウェブサイトをPWA Builderでストア用パッケージにまとめる方法で、コードは不要です。nativeは、アプリ全体をスマートフォン用プロジェクトとして、オーナーがパソコンでビルドする方法で、広告とアプリ内課金に必要です。それ以外の値には400を返します。 |
アプリにはコードが必要です。公開済みの場合は、公開中のアプリにストア用アイコン(/icon-512.png)も問い合わせます。待つのは最大5秒です。
wayなしのレスポンス
{
"ok": true,
"app": { "name": "Coffee shop", "url": "https://coffee-shop.setherion.app" },
"ready": [
{
"item": "Published on the web",
"state": "ok",
"note": "https://coffee-shop.setherion.app"
},
{
"item": "Store icon",
"state": "ok",
"note": "PNG in every size the stores ask for, made when the app is published."
},
{
"item": "Privacy policy page",
"state": "missing",
"note": "Both stores ask for a link to one, and none was found in this app.",
"fix": "Add a Privacy Policy page at /privacy, linked from the footer and from the sign-up screen. Say what the app keeps (the account email and what people enter), why, for how long, that nothing is sold, and how to ask for an account and its data to be deleted. Leave the owner's contact email as a placeholder to fill in."
}
],
"ways": {
"easy": "Easy, no code: PWA Builder wraps the published website into store packages. About 2 steps in Setherion, the rest in the stores. Android is done from any computer; iPhone needs a Mac with Xcode.",
"native": "Native, for developers: the whole app as a phone project (Capacitor). Needed for ads and in-app purchases. Built on the owner's computer (Android Studio; a Mac with Xcode for iPhone), or in the cloud by GitHub when pushed to GitHub: no Android Studio and no Mac."
},
"onlyInSetherion": "In Setherion: open the app, Publish, then \"Publish to app stores\". Only there: dropping PWA Builder's ZIP, adding Google Play's key, downloading the phone project or pushing it to GitHub, the store screenshots (every size both stores ask for, free), and the store guidelines check. The window ticks the steps it can see, and keeps the owner's own ticks."
}| フィールド | 型 | 意味 |
|---|---|---|
app | object | アプリのnameと、そのurlです。公開していない場合はnullになります。 |
ready | list | 整っているものと、足りないものです。下の説明をご覧ください。 |
ways | object | 各方法easyとnativeについての1文です。 |
onlyInSetherion | string | Setherionのウィンドウだけでできること。プログラムがどこまで届くかを知るためのものです。 |
readyリスト
各項目にはitem、state、noteがあり、fixが付くこともあります。
| フィールド | 意味 |
|---|---|
item | 確認する対象です。 |
state | ok、missing、または、今回確認できなかった場合のunknownです。 |
note | 理由を述べた1文です。 |
fix | エディターが追加できるmissingの項目にだけ付きます。オーナーが同意したあと、promptとしてアプリを編集するに送るテキストです。編集にはクレジットがかかるためです。 |
表示される項目
- Published on the web。 アプリにアドレスがあれば
okです。なければmissingになります。Easyの方法は公開済みのアドレスをパッケージにするので、先に公開してください。Nativeの方法ではなくても進められます。 - Store icon。 アプリを公開してからでないと一覧に出ません。公開中のアプリがPNGアイコンを配信していれば
ok、していなければmissing(もう一度公開してください。独自ドメインのアプリは、今のところSVGアイコンしかありません)、公開中のアプリを確認できなかった場合はunknownです。 - Delete account button。 アプリに新規登録できる場合にだけ一覧に出ます。Appleは、これがないアプリを受け付けません。
missingにはfixが付きます。 - Privacy policy page。 どちらのストアもリンクを求めます。
missingにはfixが付きます。
wayありのレスポンス
同じフィールドに加えて、指定した方法の手順が返ります。
{
"ok": true,
"app": { "name": "Coffee shop", "url": "https://coffee-shop.setherion.app" },
"ready": [ "... as above ..." ],
"ways": { "easy": "...", "native": "..." },
"way": "easy",
"android": [
{
"step": 1,
"title": "Make the Android package",
"meta": "PWA Builder, about 2 minutes",
"detail": "Open PWA Builder with the app's address filled in. Choose Package for stores, then Android, and download the ZIP.",
"link": "https://www.pwabuilder.com/reportcard?site=https%3A%2F%2Fcoffee-shop.setherion.app"
},
{
"step": 2,
"title": "Link the app to your site",
"meta": "So it opens without a browser's address bar",
"detail": "In Setherion: open the app, Publish, then \"Publish to app stores\", Easy, Android, this step: drop the ZIP from PWA Builder there. ...",
"done": false
}
],
"iphone": [ "... five steps, numbered the same way ..." ],
"iphoneNotes": [
"A Mac is needed. The Easy way builds the iPhone app on a Mac with Xcode. The Native way can build it on GitHub's Mac computers instead. Make sure you have one of the two before you pay Apple's $99 a year.",
"To Apple this looks like a website. Nobody signs in, nothing is saved, and Apple turns down apps that are only a website (guideline 4.2). Sign-in, saved data and features people come back to make it an app. Run the store guidelines check on the first page before you send it."
],
"onlyInSetherion": "..."
}(ここでは短くしています。実際のレスポンスには、すべての手順が省略なしで入っています。)
| フィールド | 型 | 意味 |
|---|---|---|
way | string | 指定した方法で、easyまたはnativeです。 |
android | list | Androidの手順を順番に並べたものです。 |
iphone | list | iPhoneの手順を順番に並べたものです。 |
iphoneNotes | list of strings | Appleに受け付けられない可能性があるものを、1つ1文で並べたものです。ウィンドウに見出しがある場合は、同じ見出しが付きます。 |
各手順には次のフィールドがあります。
| フィールド | 型 | 意味 |
|---|---|---|
step | number | リストでの位置です。1から始まります。 |
title | string | 手順の名前で、ウィンドウに表示されるものと同じです。 |
meta | string | 短い1行です。かかる時間、必要なもの、費用などを書きます。 |
detail | string | やることです。実行するコマンドなど、複数行になることがあります。 |
link | string | 作業する場所があるときの、その場所です。ない場合は省かれます。 |
done | boolean | AndroidのEasyの方法で、Setherionが自分で確認できる手順にだけ付きます。サイトへのリンクと、Google Playのキーです。確認できない場合は省かれます。 |
各リストの手順
Easy、Android:Androidパッケージを作る、アプリをサイトにリンクする、Google Playのデベロッパーアカウントを開く、アップロードしてテストする、Google Playのキーを追加する、ストアページを入力してリリースする。
Easy、iPhone:Appleのデベロッパーアカウントを開く、iPhone用パッケージを作る、ビルドしてアップロードする、自分のiPhoneで試す、ストアページを入力して審査に送る。
Native、Android:プロジェクトをダウンロードする、ビルドする、署名する、アップロードしてテストする、リリースする。
Native、iPhone:プロジェクトをダウンロードする、ビルドする、署名してアップロードする、自分のiPhoneで試す、ストアページを入力して審査に送る。
Nativeの方法では、アプリが広告を表示したり商品を販売したりする場合、detailのコマンドに追加のセットアップ手順が含まれます。ストアのフォーム向けの、広告とアプリ内課金に関する注意書きも加わります。
エラー
| ステータス | 発生する場合 |
|---|---|
400 | wayがeasyでもnativeでもない値です。 |
401 | キーがない、間違っている、または取り消されています。 |
404 | そのアプリが存在しないか、お使いのキーでは開けません。 |
409 | アプリにまだコードがありません。先にSetherionで作ってください。 |
エラー文の原文
| ステータス | error |
|---|---|
400 | way is "easy" or "native". |
404 | No such app on this account. |
409 | This app has no code yet. Build it in Setherion first. |
このページは役に立ちましたか?
