Plus Exchange/Write

From EQdkp Plus
Jump to: navigation, search

tools.php?action=compare_version&repo=core&version=2.3.x&lang=en&.png


Versionsinformation
Core 2.3.x


Introduction

Before 2.3, the content posted to the modules needs to be XML. Since 2.3, the content can be JSON as well as XML. The format will be detected automatically, but you should set the format-flag to json if you want a JSON result.

Authentication is required for each write module.

Raid signup

Index Description
Name raid_signup
Description Singup to an Raid
Method POST
URL-Params -
Authentication User API token, and permission for calendarobject calendarevent
Since EQdkp Plus 2.0
POST-Data
  • eventid (integer)
  • memberid (integer)
  • status (integer)
  • role (integer; only needed if raid-categories is "roles")
  • note (string; optional)
  • raidgroup (integer; optional, since 2.0)
Sample Call
POST <<PATH>>/api.php?function=raid_signup&atoken=ab64bb407272511cbd5d577cd346eab62d26e07c6d7190d9&atype=user HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
	<eventid>18</eventid>
	<memberid>79</memberid>
	<status>2</status>
	<role>1</role>
	<note>Testnote</note>
</request>
Sample Return
<response>
  <status>1</status>
</response>

Add comment

Index Description
Name add_comment (comment_add for EQdkp Plus < 2.3)
Description Add a new comment
Method POST
URL-Params -
Authentication User API token
Since EQdkp Plus 2.0
POST-Data
  • comment (string)
  • page (string)
  • attachid (string)
  • reply_to (integer; optional)
Sample Call
POST <<PATH>>/api.php?function=add_comment&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
	<comment>This is a test comment</comment>
	<page>articles</page>
	<attachid>1</attachid>
	<reply_to>0</reply_to>
</request>
Sample Return
<response>
  <status>1</status>
</response>

Add Raid

Index Description
Name add_raid
Description Adds a new raid
Method POST
URL-Params
  • test (optional, set to true to not create a new raid)
Authentication Admin API Token or user token with permission a_raid_add (Add Raid)
Since EQdkp Plus 2.0
POST-Data
  • raid_date (Y-m-d H:i)
  • raid_attendees (Array of member)
  • raid_value (float)
  • raid_event_id (integer)
  • raid_note (string; optional)
Sample Call
POST <<PATH>>/api.php?function=add_raid&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
<raid_date>2015-02-01 19:30</raid_date>
<raid_attendees><member>1</member><member>2</member></raid_attendees>
<raid_value>10</raid_value>
<raid_event_id>1</raid_event_id>
<raid_note>Notiz</raid_note>
</request>
Sample Return
<response>
  <raid_id>3</raid_id>
  <status>1</status>
</response>

Add Item

Index Description
Name add_item
Description Adds an item
Method POST
URL-Params
  • test (optional, set to true to not create a new item)
Authentication Admin API Token or user token with permission a_item_add (Add Item)
Since EQdkp Plus 2.0
POST-Data
  • item_date (Y-m-d H:i)
  • item_name (String)
  • item_buyers (Array of member)
  • item_raid_id (integer)
  • item_value (float)
  • item_itempool_id (integer)
  • item_game_id (string; optional)
Sample Call
POST <<PATH>>/api.php?function=add_item&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
<item_date>2015-02-01 19:30</item_date>
<item_buyers><member>1</member><member>2</member></item_buyers>
<item_value>10</item_value>
<item_name>Axt</item_name>
<item_raid_id>3</item_raid_id>
<item_itempool_id>1</item_itempool_id>
</request>
Sample Return
<response>
  <item_id>4</item_id>
  <status>1</status>
</response>"

Add Adjustment

Index Description
Name add_adjustment
Description Adds an Adjustment
Method POST
URL-Params
  • test (optional, set to true to not create a new adjustment)
Authentication Admin API Token or User Token with permission a_indivadj_add (Add Adjustment)
Since EQdkp Plus 2.0
POST-Data
  • adjustment_date (Y-m-d H:i)
  • adjustment_reason (String)
  • adjustment_members (Array of member)
  • adjustment_value (float)
  • adjustment_raid_id (integer; optional)
  • adjustment_event_id (integer; optional)
Sample Call
POST <<PATH>>/api.php?function=add_adjustment&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
<adjustment_date>2015-02-01 19:30</adjustment_date>
<adjustment_members><member>1</member><member>2</member></adjustment_members>
<adjustment_value>10</adjustment_value>
<adjustment_reason>Axt</adjustment_reason>
<adjustment_raid_id>3</adjustment_raid_id>
</request>
Sample Return
<response>
  <adjustment_id>
    <i0>1</i0>
    <i1>2</i1>
  </adjustment_id>
  <status>1</status>
</response>

Add Event

Index Description
Name add_event
Description Adds an Event
Method POST
URL-Params
  • test (optional, set to true to not create a new event)
Post-Data
  • event_name (String)
  • event_value (float)
Authentication Admin API Token or User Token with permission a_event_add (Add Event)
Since EQdkp Plus 2.1
Sample Call
POST <<PATH>>/api.php?function=add_event&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
<event_name>MyEvent</event_name>
<event_value>10</event_value>
</request>
POST <<PATH>>/api.php?function=add_event&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api&format=json HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/json; charset=UTF-8
Connection: Close

{"event_name":"Testevent","event_value":10}
Sample Return
<response>
  <event_id>21</event_id>
  <status>1</status>
</response>"

Add User

Index Description
Name user
Description Adds an User
Method POST
URL-Params
Post-Data
  • username (String)
  • password (String)
  • email (String)
  • rules (Integer)
Authentication Admin API Token
Since EQdkp Plus 2.3
Sample Call
POST <<PATH>>/api.php?function=user&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
<username>Testuser</username>
<password>123456789</password>
<email>test@test.com</email>
<rules>1</rules>
</request>
Sample Return
<response>
  <user_id>21</event_id>
  <status>1</status>
</response>"

Add Character

Index Description
Name character
Description Adds an Character
Method POST
URL-Params * test (optional, set to true to not create a new character)
Post-Data

Get the required Post-Data from the GET character Method

Authentication Admin API Token
Since EQdkp Plus 2.3
Sample Call
POST <<PATH>>/api.php?function=character&atoken=62d26e07c6d7190d9ab64bb407272511cbd5d577cd346eab&atype=api HTTP/1.1
Host: <<HOST>>
Content-Length: 121
Content-Type: application/atom+xml; charset=UTF-8
Connection: Close

<request>
<name>Testchar</name>
<servername>Antonidas</servername>
</request>
Sample Return
<response>
  <character_id>17</event_id>
  <status>1</status>
</response>"