Package com.podio.calendar
Class CalendarAPI
- java.lang.Object
-
- com.podio.BaseAPI
-
- com.podio.calendar.CalendarAPI
-
public class CalendarAPI extends BaseAPI
The calendar is used to get the calendar for a user. The calendar includes items with a date field in the interval and tasks with a due date in the interval.Calendar entries are always sorted by date.
-
-
Constructor Summary
Constructors Constructor Description CalendarAPI(ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Event>getApp(int appId, org.joda.time.LocalDate dateFrom, org.joda.time.LocalDate dateTo, ReferenceType... types)Returns the items and tasks that are related to the given app.List<Event>getGlobal(org.joda.time.LocalDate dateFrom, org.joda.time.LocalDate dateTo, List<Integer> spaceIds, ReferenceType... types)Returns all items that the user have access to and all tasks that are assigned to the user.List<Event>getSpace(int spaceId, org.joda.time.LocalDate dateFrom, org.joda.time.LocalDate dateTo, ReferenceType... types)Returns all items and tasks that the user have access to in the given space.-
Methods inherited from class com.podio.BaseAPI
getResourceFactory
-
-
-
-
Constructor Detail
-
CalendarAPI
public CalendarAPI(ResourceFactory resourceFactory)
-
-
Method Detail
-
getApp
public List<Event> getApp(int appId, org.joda.time.LocalDate dateFrom, org.joda.time.LocalDate dateTo, ReferenceType... types)
Returns the items and tasks that are related to the given app.- Parameters:
appId- The id of the appdateFrom- The from datedateTo- The to datetypes- The types of events that should be returned. Leave out to get all types of events.- Returns:
- The events in the calendar
-
getSpace
public List<Event> getSpace(int spaceId, org.joda.time.LocalDate dateFrom, org.joda.time.LocalDate dateTo, ReferenceType... types)
Returns all items and tasks that the user have access to in the given space. Tasks with reference to other spaces are not returned or tasks with no reference.- Parameters:
spaceId- The id of the spacedateFrom- The from datedateTo- The to datetypes- The types of events that should be returned. Leave out to get all types of events.- Returns:
- The events in the calendar
-
getGlobal
public List<Event> getGlobal(org.joda.time.LocalDate dateFrom, org.joda.time.LocalDate dateTo, List<Integer> spaceIds, ReferenceType... types)
Returns all items that the user have access to and all tasks that are assigned to the user. The items and tasks can be filtered by a list of space ids, but tasks without a reference will always be returned.- Parameters:
dateFrom- The from datedateTo- The to datetypes- The types of events that should be returned. Leave out to get all types of events.- Returns:
- The events in the calendar
-
-