Answers.Body: <p>I don't have the Venti Calendar plugin, so I can't test this, but it should be as simple as setting the <code>elementType</code> propety to whatever custom element type the plugin has created and you want to use and (optionally) setting any criteria you want defined by the element type.</p>
  
  <pre><code>return [
      'endpoints' =&gt; [
          'news.json' =&gt; [
              'elementType' =&gt; 'Venti_Event',
              'criteria' =&gt; ['key' =&gt; 'value'], 
              'transformer' =&gt; function(Venti_EventModel $eventModel) {
                  return [
                      'key' =&gt; $eventModel-&gt;property,
                  ];
              },
          },
      ]
  ];
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-03T01:09:03.033Z
Answers.Text: The custom element type is "Venti_Event".
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-03T03:06:52.620Z
Answers.Text: Cool... I assume there is a `Venti_EventModel` as well?
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-03T03:27:40.973Z
Answers.Text: Yes that would be it Venti_EventModel
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-03T04:33:48.123Z
Answers.Text: Updated answer!
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-03T18:23:15.470Z
Answers.Text: I tried it with 'Venti_EventElementType' as elementType name after searching in the plugin files that was the problem ;) thanx for the answer!
Answers.UserDisplayName: Maarten Heideman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T22:09:47.047Z
Answers.LastActivityDate: 2017-01-03T04:33:17.053Z
Answers.LastEditDate: 2017-01-03T04:33:17.053Z
Answers.UserDisplayName: Brad Bell
Body: <p>I want an endpoint in the <a href="https://github.com/pixelandtonic/ElementAPI" rel="nofollow noreferrer">Element API plugin</a> that shows the last event entries from the <a href="https://venticalendar.io" rel="nofollow noreferrer">Venti Calendar</a> plugin. The Element API guide tells that's possible to use the plugin with custom element types. But how? </p>
  
Tags: <plugin-elementapi><plugin-ventievents>
Title: How do you use the Venti Calendar plugin with the Element API plugin?
ThreadText: # How do you use the Venti Calendar plugin with the Element API plugin?
  
  (Asked by: username_0 on 2017-01-02)
  
  I want an endpoint in the [Element API plugin](https://github.com/pixelandtonic/ElementAPI) that shows the last event entries from the [Venti Calendar](https://venticalendar.io) plugin. The Element API guide tells that's possible to use the plugin with custom element types. But how?
  
  **Tags:** plugin-elementapi, plugin-ventievents
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-02. Score: 2 | Accepted answer
  
  I don't have the Venti Calendar plugin, so I can't test this, but it should be as simple as setting the `elementType` propety to whatever custom element type the plugin has created and you want to use and (optionally) setting any criteria you want defined by the element type.
  
  ```
  return [
      'endpoints' => [
          'news.json' => [
              'elementType' => 'Venti_Event',
              'criteria' => ['key' => 'value'], 
              'transformer' => function(Venti_EventModel $eventModel) {
                  return [
                      'key' => $eventModel->property,
                  ];
              },
          },
      ]
  ];
  
  ```
  
  > **Comments:**
  > **username_2**: The custom element type is "Venti_Event".  
  > **username_1**: Cool... I assume there is a `Venti_EventModel` as well?  
  > **username_2**: Yes that would be it Venti_EventModel  
  > **username_1**: Updated answer!  
  > **username_0**: I tried it with 'Venti_EventElementType' as elementType name after searching in the plugin files that was the problem ;) thanx for the answer!  
  
  ---
  
  