토픽 CRUD
토픽 생성 수정 삭제 api
토픽 목록
GET
https://api.mint-app.com/v1/topic
Query Parameters
Name | Type | Description |
---|---|---|
last_key | string | 마지막 토픽의 아이디 (cursor 방식) |
{
"result": "success",
"data": [
{
"updated_at": "2021-08-27 14:03:43",
"count": 0,
"is_cancel": true,
"created_at": "2021-08-26 16:28:09",
"timestamp": 1629962889246,
"project_key": 4,
"is_deletable": true,
"id": "9c72a751-d97e-4135-b191-9386b8f5cd00",
"name": "남성 토픽",
"type": "gender_male",
"desc": "남성 사용자들 구독"
},...
]
}
{
"result": "failed",
"reason": "유효하지 않은 키값입니다."
}
{
"result": "failed",
"reason": "존재하지 않는 사용자입니다."
}
sample
curl --location --request POST 'https://api.mint-app.com/v1/topic/' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--header 'Content-Type: application/json'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/topic/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/topic/")
.method("POST", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
토픽 생성
POST
https://api.mint-app.com/v1/topic
Request Body
Name | Type | Description |
---|---|---|
desc | string | 토픽설명 |
type | string | 토픽종류 이름 |
name | string | 토픽이름 |
{
"result": "success",
"data": {
"id": "ba719487-6ab2-4c87-982c-46680cf728e7",
"project_key": 4,
"is_cancel": true,
"is_deletable": true,
"name": "토픽 테스트",
"desc": "토픽 테스트 설명",
"count": 0,
"timestamp": 1631857396686,
"type": "topic1",
"updated_at": "2021-09-17 14:43:16",
"created_at": "2021-09-17 14:43:16"
}
}
{
"result": "failed",
"reason": "유효하지 않은 키값입니다."
}
{
"result": "failed",
"reason": "존재하지 않는 사용자입니다."
}
sample
curl --location --request POST 'https://api.mint-app.com/v1/topic/' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'type=topic' \
--data-urlencode 'name=토픽 테스트11' \
--data-urlencode 'desc=토픽 테스트 설명222'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/topic/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'type=topic&name=%ED%86%A0%ED%94%BD%20%ED%85%8C%EC%8A%A4%ED%8A%B811&desc=%ED%86%A0%ED%94%BD%20%ED%85%8C%EC%8A%A4%ED%8A%B8%20%EC%84%A4%EB%AA%85222',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "type=topic&name=토픽 테스트11&desc=토픽 테스트 설명222");
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/topic/")
.method("POST", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();
토픽 상세 정보
GET
https://api.mint-app.com/v1/topic/{topicId}
Path Parameters
Name | Type | Description |
---|---|---|
topicId | string | 토픽아이디 |
{
"result": "success",
"data": [
{
"updated_at": "2021-08-27 14:03:43",
"count": 0,
"is_cancel": true,
"created_at": "2021-08-26 16:28:09",
"timestamp": 1629962889246,
"project_key": 4,
"is_deletable": true,
"id": "9c72a751-d97e-4135-b191-9386b8f5cd00",
"name": "남성 토픽",
"type": "gender_male",
"desc": "남성 사용자들 구독"
},...
]
}
{
"result": "failed",
"reason": "유효하지 않은 키값입니다."
}
{
"result": "failed",
"reason": "존재하지 않는 사용자입니다."
}
sample
curl --location --request POST 'https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--header 'Content-Type: application/json'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7")
.method("POST", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
토픽 정보 수정
PUT
https://api.mint-app.com/v1/topic/{topicId}/update
Path Parameters
Name | Type | Description |
---|---|---|
topicId | string | 토픽 아이디 |
Request Body
Name | Type | Description |
---|---|---|
name | string | 토픽이름 |
desc | string | 토픽 설명 |
{
"result": "success",
"data": {
"id": "ba719487-6ab2-4c87-982c-46680cf728e7",
"project_key": 4,
"is_cancel": true,
"is_deletable": true,
"name": "토픽 테스트",
"desc": "토픽 테스트 설명",
"count": 0,
"timestamp": 1631857396686,
"type": "topic1",
"updated_at": "2021-09-17 14:43:16",
"created_at": "2021-09-17 14:43:16"
}
}
{
"result": "failed",
"reason": "유효하지 않은 키값입니다."
}
{
"result": "failed",
"reason": "존재하지 않는 사용자입니다."
}
sample
curl --location --request PUT 'https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7/update' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--header 'Content-Type: application/json'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7/update',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7/update")
.method("PUT", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
토픽 정보 수정
DELETE
https://api.mint-app.com/v1/topic/{topicId}/destory
Path Parameters
Name | Type | Description |
---|---|---|
topicId | string |
{
"result": "success",
"data": true
}
{
"result": "failed",
"reason": "유효하지 않은 키값입니다."
}
{
"result": "failed",
"reason": "존재하지 않는 사용자입니다."
}
sample
curl --location --request DELETE 'https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7/update' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--header 'Content-Type: application/json'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7/update',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/topic/ba719487-6ab2-4c87-982c-46680cf728e7/update")
.method("DELETE", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Last updated