<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Entity API - Xcraft</title>
    <link>/goblins/entityapi/index.html</link>
    <description>Describe the auto-generated API for entities.&#xA;Some call contains an contextual parts &lt;&gt; refering the destination property name.&#xA;addTo addNewTo addCopyTo moveInto removeFrom set clear</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="/goblins/entityapi/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>addNewTo&lt;&gt;</title>
      <link>/goblins/entityapi/addnewto/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/goblins/entityapi/addnewto/index.html</guid>
      <description>Will create a new value and add it into the collection. This method is generally called by workitems when you add a new element in CRUD.&#xA;This method is generated only for collection of values, ex:&#xA;{ type: &#39;project&#39;, values: { tasks: &#39;task[0..n]&#39;; } } Example Add a new task entity into the tasks collection, using default values&#xA;yield projectAPI.addNewToTasks(); Using a payload for initializing the new task&#xA;const payload = { subject: &#39;Clean task&#39;, description: &#39;Clean codebase&#39; }; yield projectAPI.</description>
    </item>
    <item>
      <title>apply</title>
      <link>/goblins/entityapi/apply/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/goblins/entityapi/apply/index.html</guid>
      <description>Apply a new state to an entity.&#xA;Example const patch = { score: 110, lvl: 10, powerUpStatus: &#39;enabled&#39;, }; yield entityAPI.apply({patch});</description>
    </item>
    <item>
      <title>change</title>
      <link>/goblins/entityapi/change/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/goblins/entityapi/change/index.html</guid>
      <description>Change the state of an entity. The path arguments supports the Shredder set syntax&#xA;Example yield entityAPI.change({path: &#39;score&#39;, newValue: 110});</description>
    </item>
    <item>
      <title>clear&lt;&gt;</title>
      <link>/goblins/entityapi/clear/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/goblins/entityapi/clear/index.html</guid>
      <description>Clear a collection&#xA;Example Remove all tasks in collection.&#xA;Important: if tasks is by value, all values will be hard deleted from storage.&#xA;yield entityAPI.clearTasks();</description>
    </item>
    <item>
      <title>get</title>
      <link>/goblins/entityapi/get/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/goblins/entityapi/get/index.html</guid>
      <description>Return the full entity state or a sub path. The path arguments supports the Shredder get syntax&#xA;Example const entityState = yield entityAPI.get(); const name = yield entityAPI.get({path:&#39;name&#39;}); const metaStatus = yield entityAPI.get({path:&#39;meta.status&#39;});</description>
    </item>
    <item>
      <title>set&lt;&gt;</title>
      <link>/goblins/entityapi/set/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/goblins/entityapi/set/index.html</guid>
      <description>Example Set customer relationship&#xA;yield entityAPI.setCustomer({entityId: &#39;customer@some-uuid&#39;});</description>
    </item>
  </channel>
</rss>