This is a standard ApplicationEditor method which allows you to create and modify objects by applying transactions. For documentation on these endpoints, see Conduit API: Using Edit Endpoints.
Conduit badge.edit
badge.edit
badge.edit
API Method: badge.edit
API Method: badge.edit
Login Required: This method requires authentication. You must log in before you can make calls to it.
- Returns
- map<string, wild>
- Errors
- ERR-CONDUIT-CORE: See error message for details.
- OAuth Scope
- OAuth clients may never call this method.
Description
Transaction Types
Transaction Types
This endpoint supports these types of transactions. See below for detailed information about each transaction type.
Key | Description |
---|---|
name | Badge name. |
flavor | Short description of the badge. |
icon | Change the badge icon. |
quality | Color and rarity of the badge. |
description | Badge long description. |
award | New badge award recipients. |
revoke | Revoke badge award recipients. |
edit | Change the edit policy of the object. |
subscribers.add | Add subscribers. |
subscribers.remove | Remove subscribers. |
subscribers.set | Set subscribers, overwriting current value. |
comment | Make comments. |
mfa | Sign this transaction group with MFA. |
Transaction Type: name
Transaction Type: name
Badge name.
Key | Type | Description |
---|---|---|
type | const | name |
value | string | New badge name. |
Transaction Type: flavor
Transaction Type: flavor
Short description of the badge.
Key | Type | Description |
---|---|---|
type | const | flavor |
value | string | New badge flavor. |
Transaction Type: icon
Transaction Type: icon
Change the badge icon.
Key | Type | Description |
---|---|---|
type | const | icon |
value | string | New badge icon. |
Transaction Type: quality
Transaction Type: quality
Color and rarity of the badge.
Key | Type | Description |
---|---|---|
type | const | quality |
value | string | New badge quality. |
Transaction Type: description
Transaction Type: description
Badge long description.
Key | Type | Description |
---|---|---|
type | const | description |
value | string | New badge description. |
Transaction Type: award
Transaction Type: award
New badge award recipients.
Key | Type | Description |
---|---|---|
type | const | award |
value | list<phid> | New badge award recipients. |
Transaction Type: revoke
Transaction Type: revoke
Revoke badge award recipients.
Key | Type | Description |
---|---|---|
type | const | revoke |
value | list<phid> | Revoke badge award recipients. |
Transaction Type: edit
Transaction Type: edit
Change the edit policy of the object.
Key | Type | Description |
---|---|---|
type | const | edit |
value | string | New policy PHID or constant. |
Transaction Type: subscribers.add
Transaction Type: subscribers.add
Add subscribers.
Key | Type | Description |
---|---|---|
type | const | subscribers.add |
value | list<user> | List of PHIDs to add. |
Transaction Type: subscribers.remove
Transaction Type: subscribers.remove
Remove subscribers.
Key | Type | Description |
---|---|---|
type | const | subscribers.remove |
value | list<user> | List of PHIDs to remove. |
Transaction Type: subscribers.set
Transaction Type: subscribers.set
Set subscribers, overwriting current value.
Key | Type | Description |
---|---|---|
type | const | subscribers.set |
value | list<user> | List of PHIDs to set. |
Transaction Type: comment
Transaction Type: comment
Make comments.
Key | Type | Description |
---|---|---|
type | const | comment |
value | string | Comment to add, formatted as remarkup. |
Transaction Type: mfa
Transaction Type: mfa
Sign this transaction group with MFA.
Key | Type | Description |
---|---|---|
type | const | mfa |
value | bool |
Call Method
Call Method
Examples
Examples
- Use the Conduit API Tokens panel in Settings to generate or manage API tokens.
- If you submit parameters, these examples will update to show exactly how to encode the parameters you submit.
$ echo <json-parameters> | arc call-conduit --conduit-uri https://phab.krasnow.me/ --conduit-token <conduit-token> -- badge.edit
$ curl https://phab.krasnow.me/api/badge.edit \
-d api.token=api-token \
-d param=value \
...
-d api.token=api-token \
-d param=value \
...
<?php
require_once 'path/to/libphutil/src/__phutil_library_init__.php';
$api_token = "<api-token>";
$api_parameters = array(<parameters>);
$client = new ConduitClient('https://phab.krasnow.me/');
$client->setConduitToken($api_token);
$result = $client->callMethodSynchronous('badge.edit', $api_parameters);
print_r($result);
Copyright Michael Krasnow · Main Site