Prepare for marketplace

* add vendor to gitignore
* small code adjustments
* add MIT license
This commit is contained in:
2019-10-26 10:48:34 +02:00
parent 307849f308
commit b43f5b8d5b
8 changed files with 28 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vendor

0
DOCUMENTATION.md Normal file
View File

19
LICENCE.md Normal file
View File

@@ -0,0 +1,19 @@
# MIT license
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0
README.md Normal file
View File

View File

@@ -1,6 +1,6 @@
<?php namespace NicoSt\GCalendar\Classes; <?php namespace NicoSt\GCalendar\Classes;
class Event { class EventEntity {
var $calendar_name; var $calendar_name;
var $event_name; var $event_name;

View File

@@ -1,7 +1,6 @@
<?php namespace NicoSt\GCalendar\Components; <?php namespace NicoSt\GCalendar\Components;
use Cms\Classes\ComponentBase; use Cms\Classes\ComponentBase;
use NicoSt\GCalendar\Classes\Event;
use NicoSt\GCalendar\Classes\GoogleCalendarService; use NicoSt\GCalendar\Classes\GoogleCalendarService;
use Mobile_Detect; use Mobile_Detect;

View File

@@ -1,7 +1,7 @@
<?php namespace NicoSt\GCalendar\Components; <?php namespace NicoSt\GCalendar\Components;
use Cms\Classes\ComponentBase; use Cms\Classes\ComponentBase;
use NicoSt\GCalendar\Classes\Event; use NicoSt\GCalendar\Classes\EventEntity;
use NicoSt\GCalendar\Classes\GoogleCalendarService; use NicoSt\GCalendar\Classes\GoogleCalendarService;
use NicoSt\GCalendar\Models\Settings; use NicoSt\GCalendar\Models\Settings;
@@ -27,6 +27,7 @@ class Upcoming extends ComponentBase {
return $connector->calendarList(); return $connector->calendarList();
} }
*/ */
public function defineProperties() { public function defineProperties() {
return [ return [
'maxEvents' => [ 'maxEvents' => [
@@ -67,7 +68,7 @@ class Upcoming extends ComponentBase {
foreach ($calendarEvents as $calendarEvent) { foreach ($calendarEvents as $calendarEvent) {
foreach ($calendarEvent as $event) { foreach ($calendarEvent as $event) {
// Map to data response object. // Map to data response object.
$eventObject = new Event(); $eventObject = new EventEntity();
$eventObject->setCalendarName($calendarEvent->summary); $eventObject->setCalendarName($calendarEvent->summary);
$eventObject->setEventName($event->summary); $eventObject->setEventName($event->summary);
$eventObject->setLocation($event->location); $eventObject->setLocation($event->location);

View File

@@ -1,8 +1,9 @@
{ {
"name": "nicost/gcalendar", "name": "nicost/oc-gcalendar-plugin",
"type": "october-plugin", "type": "october-plugin",
"description": "Calendar plugin which uses the Google Calendar API. Provides a component to show the next upcoming events from google calendars.", "description": "OctoberCMS calendar plugin which uses the Google Calendar API to provide event data.",
"keywords": ["october", "cms", "google", "calendar", "events", "schedule", "kalender"], "keywords": ["october", "cms", "google", "calendar", "events", "schedule", "kalender"],
"license": "MIT",
"authors": [ "authors": [
{ {
"name": "Nico Störzbach" "name": "Nico Störzbach"