#' List Buses
#'
#' This function returns a dataframe or json object of Buses
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given Buses. Defaults to FALSE for all return fields which, for convenience, returns all fields for the Buses.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('Bus') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of Buses
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listBuses <- function(searchConditionsList = NULL, BusID = F, Capacity = F, Code = F, CreatedTime = F, Description = F, DistrictID = F, HasHistoricBusRoutes = F, IsActive = F, ModifiedTime = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "Bus", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a Bus
#'
#' This function returns a dataframe or json object of a Bus
#' @param BusID The ID of the Bus to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given Bus. Defaults to FALSE for all return fields which, for convenience, returns all fields for the Bus.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('Bus') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of Bus
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getBus <- function(BusID, Capacity = F, Code = F, CreatedTime = F, Description = F, DistrictID = F, HasHistoricBusRoutes = F, IsActive = F, ModifiedTime = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "BusID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "Bus", objectId = BusID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a Bus
#'
#' This function deletes a Bus
#' @param BusID The ID of the Bus to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The BusID of the deleted Bus.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteBus <- function(BusID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "Bus", objectId = BusID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a Bus
#'
#' This function creates a Bus
#' @param fieldNames The field values to give the created Bus. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created Bus
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createBus <- function(Capacity = NULL, Code = NULL, Description = NULL, DistrictID = NULL, IsActive = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "Bus", body = list(DataObject = body), searchFields = append("BusID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a Bus
#'
#' This function modifies a Bus
#' @param fieldNames The field values to give the modified Bus. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified Bus
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyBus <- function(BusID, Capacity = NULL, Code = NULL, Description = NULL, DistrictID = NULL, IsActive = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "Bus", objectId = BusID, body = list(DataObject = body), searchFields = append("BusID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List TransportationCategories
#'
#' This function returns a dataframe or json object of TransportationCategories
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TransportationCategories. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TransportationCategories.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TransportationCategory') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of TransportationCategories
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listTransportationCategories <- function(searchConditionsList = NULL, Code = F, CodeDescription = F, CreatedTime = F, Description = F, DistrictID = F, ModifiedTime = F, SchoolYearID = F, StateTransportationCategoryCodeMNID = F, TransportationCategoryID = F, TransportationCategoryIDClonedFrom = F, TransportationCategoryMNID = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "TransportationCategory", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a TransportationCategory
#'
#' This function returns a dataframe or json object of a TransportationCategory
#' @param TransportationCategoryID The ID of the TransportationCategory to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TransportationCategory. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TransportationCategory.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TransportationCategory') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of TransportationCategory
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getTransportationCategory <- function(TransportationCategoryID, Code = F, CodeDescription = F, CreatedTime = F, Description = F, DistrictID = F, ModifiedTime = F, SchoolYearID = F, StateTransportationCategoryCodeMNID = F, TransportationCategoryIDClonedFrom = F, TransportationCategoryMNID = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "TransportationCategoryID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "TransportationCategory", objectId = TransportationCategoryID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a TransportationCategory
#'
#' This function deletes a TransportationCategory
#' @param TransportationCategoryID The ID of the TransportationCategory to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The TransportationCategoryID of the deleted TransportationCategory.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteTransportationCategory <- function(TransportationCategoryID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "TransportationCategory", objectId = TransportationCategoryID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a TransportationCategory
#'
#' This function creates a TransportationCategory
#' @param fieldNames The field values to give the created TransportationCategory. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created TransportationCategory
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createTransportationCategory <- function(Code = NULL, Description = NULL, DistrictID = NULL, SchoolYearID = NULL, StateTransportationCategoryCodeMNID = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "TransportationCategory", body = list(DataObject = body), searchFields = append("TransportationCategoryID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a TransportationCategory
#'
#' This function modifies a TransportationCategory
#' @param fieldNames The field values to give the modified TransportationCategory. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified TransportationCategory
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyTransportationCategory <- function(TransportationCategoryID, Code = NULL, Description = NULL, DistrictID = NULL, SchoolYearID = NULL, StateTransportationCategoryCodeMNID = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "TransportationCategory", objectId = TransportationCategoryID, body = list(DataObject = body), searchFields = append("TransportationCategoryID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List BusRoutes
#'
#' This function returns a dataframe or json object of BusRoutes
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given BusRoutes. Defaults to FALSE for all return fields which, for convenience, returns all fields for the BusRoutes.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('BusRoute') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of BusRoutes
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listBusRoutes <- function(searchConditionsList = NULL, ArrivalTime = F, BusID = F, BusRouteID = F, BusRouteIDClonedFrom = F, CreatedTime = F, DepartureTime = F, Description = F, HasBusStops = F, Mileage = F, ModifiedTime = F, NameIDDriver = F, RouteType = F, SchoolYearID = F, StudentCount = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "BusRoute", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a BusRoute
#'
#' This function returns a dataframe or json object of a BusRoute
#' @param BusRouteID The ID of the BusRoute to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given BusRoute. Defaults to FALSE for all return fields which, for convenience, returns all fields for the BusRoute.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('BusRoute') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of BusRoute
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getBusRoute <- function(BusRouteID, ArrivalTime = F, BusID = F, BusRouteIDClonedFrom = F, CreatedTime = F, DepartureTime = F, Description = F, HasBusStops = F, Mileage = F, ModifiedTime = F, NameIDDriver = F, RouteType = F, SchoolYearID = F, StudentCount = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "BusRouteID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "BusRoute", objectId = BusRouteID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a BusRoute
#'
#' This function deletes a BusRoute
#' @param BusRouteID The ID of the BusRoute to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The BusRouteID of the deleted BusRoute.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteBusRoute <- function(BusRouteID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "BusRoute", objectId = BusRouteID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a BusRoute
#'
#' This function creates a BusRoute
#' @param fieldNames The field values to give the created BusRoute. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created BusRoute
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createBusRoute <- function(ArrivalTime = NULL, BusID = NULL, BusRouteIDClonedFrom = NULL, DepartureTime = NULL, Description = NULL, Mileage = NULL, NameIDDriver = NULL, RouteType = NULL, SchoolYearID = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "BusRoute", body = list(DataObject = body), searchFields = append("BusRouteID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a BusRoute
#'
#' This function modifies a BusRoute
#' @param fieldNames The field values to give the modified BusRoute. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified BusRoute
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyBusRoute <- function(BusRouteID, ArrivalTime = NULL, BusID = NULL, BusRouteIDClonedFrom = NULL, DepartureTime = NULL, Description = NULL, Mileage = NULL, NameIDDriver = NULL, RouteType = NULL, SchoolYearID = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "BusRoute", objectId = BusRouteID, body = list(DataObject = body), searchFields = append("BusRouteID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List StudentTransportations
#'
#' This function returns a dataframe or json object of StudentTransportations
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given StudentTransportations. Defaults to FALSE for all return fields which, for convenience, returns all fields for the StudentTransportations.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('StudentTransportation') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of StudentTransportations
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listStudentTransportations <- function(searchConditionsList = NULL, CreatedTime = F, DistrictID = F, EndDate = F, Miles = F, ModifiedTime = F, SchoolYearID = F, StartDate = F, StateDistrictMNID = F, StudentID = F, StudentTransportationID = F, StudentTransportationMNID = F, TransportationCategoryID = F, Transported = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "StudentTransportation", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a StudentTransportation
#'
#' This function returns a dataframe or json object of a StudentTransportation
#' @param StudentTransportationID The ID of the StudentTransportation to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given StudentTransportation. Defaults to FALSE for all return fields which, for convenience, returns all fields for the StudentTransportation.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('StudentTransportation') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of StudentTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getStudentTransportation <- function(StudentTransportationID, CreatedTime = F, DistrictID = F, EndDate = F, Miles = F, ModifiedTime = F, SchoolYearID = F, StartDate = F, StateDistrictMNID = F, StudentID = F, StudentTransportationMNID = F, TransportationCategoryID = F, Transported = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "StudentTransportationID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "StudentTransportation", objectId = StudentTransportationID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a StudentTransportation
#'
#' This function deletes a StudentTransportation
#' @param StudentTransportationID The ID of the StudentTransportation to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The StudentTransportationID of the deleted StudentTransportation.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteStudentTransportation <- function(StudentTransportationID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "StudentTransportation", objectId = StudentTransportationID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a StudentTransportation
#'
#' This function creates a StudentTransportation
#' @param fieldNames The field values to give the created StudentTransportation. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created StudentTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createStudentTransportation <- function(DistrictID = NULL, EndDate = NULL, Miles = NULL, SchoolYearID = NULL, StartDate = NULL, StateDistrictMNID = NULL, StudentID = NULL, TransportationCategoryID = NULL, Transported = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "StudentTransportation", body = list(DataObject = body), searchFields = append("StudentTransportationID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a StudentTransportation
#'
#' This function modifies a StudentTransportation
#' @param fieldNames The field values to give the modified StudentTransportation. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified StudentTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyStudentTransportation <- function(StudentTransportationID, DistrictID = NULL, EndDate = NULL, Miles = NULL, SchoolYearID = NULL, StartDate = NULL, StateDistrictMNID = NULL, StudentID = NULL, TransportationCategoryID = NULL, Transported = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "StudentTransportation", objectId = StudentTransportationID, body = list(DataObject = body), searchFields = append("StudentTransportationID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List BusStops
#'
#' This function returns a dataframe or json object of BusStops
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given BusStops. Defaults to FALSE for all return fields which, for convenience, returns all fields for the BusStops.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('BusStop') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of BusStops
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listBusStops <- function(searchConditionsList = NULL, AddressID = F, ArrivalTime = F, ArrivalTimeFormatted = F, BusRouteID = F, BusStopID = F, BusStopIDClonedFrom = F, CreatedTime = F, DepartureTime = F, Description = F, ModifiedTime = F, StopNumber = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "BusStop", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a BusStop
#'
#' This function returns a dataframe or json object of a BusStop
#' @param BusStopID The ID of the BusStop to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given BusStop. Defaults to FALSE for all return fields which, for convenience, returns all fields for the BusStop.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('BusStop') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of BusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getBusStop <- function(BusStopID, AddressID = F, ArrivalTime = F, ArrivalTimeFormatted = F, BusRouteID = F, BusStopIDClonedFrom = F, CreatedTime = F, DepartureTime = F, Description = F, ModifiedTime = F, StopNumber = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "BusStopID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "BusStop", objectId = BusStopID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a BusStop
#'
#' This function deletes a BusStop
#' @param BusStopID The ID of the BusStop to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The BusStopID of the deleted BusStop.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteBusStop <- function(BusStopID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "BusStop", objectId = BusStopID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a BusStop
#'
#' This function creates a BusStop
#' @param fieldNames The field values to give the created BusStop. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created BusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createBusStop <- function(AddressID = NULL, ArrivalTime = NULL, BusRouteID = NULL, BusStopIDClonedFrom = NULL, DepartureTime = NULL, Description = NULL, StopNumber = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "BusStop", body = list(DataObject = body), searchFields = append("BusStopID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a BusStop
#'
#' This function modifies a BusStop
#' @param fieldNames The field values to give the modified BusStop. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified BusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyBusStop <- function(BusStopID, AddressID = NULL, ArrivalTime = NULL, BusRouteID = NULL, BusStopIDClonedFrom = NULL, DepartureTime = NULL, Description = NULL, StopNumber = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "BusStop", objectId = BusStopID, body = list(DataObject = body), searchFields = append("BusStopID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List StudentBusStops
#'
#' This function returns a dataframe or json object of StudentBusStops
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given StudentBusStops. Defaults to FALSE for all return fields which, for convenience, returns all fields for the StudentBusStops.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('StudentBusStop') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of StudentBusStops
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listStudentBusStops <- function(searchConditionsList = NULL, BusStopID = F, CreatedTime = F, HasCurrentDayOfWeek = F, IsCurrentOrFutureTransported = F, IsFriday = F, IsMonday = F, IsSaturday = F, IsSunday = F, IsThursday = F, IsTuesday = F, IsWednesday = F, ModifiedTime = F, StopType = F, StudentBusStopID = F, StudentID = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "StudentBusStop", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a StudentBusStop
#'
#' This function returns a dataframe or json object of a StudentBusStop
#' @param StudentBusStopID The ID of the StudentBusStop to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given StudentBusStop. Defaults to FALSE for all return fields which, for convenience, returns all fields for the StudentBusStop.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('StudentBusStop') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of StudentBusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getStudentBusStop <- function(StudentBusStopID, BusStopID = F, CreatedTime = F, HasCurrentDayOfWeek = F, IsCurrentOrFutureTransported = F, IsFriday = F, IsMonday = F, IsSaturday = F, IsSunday = F, IsThursday = F, IsTuesday = F, IsWednesday = F, ModifiedTime = F, StopType = F, StudentID = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "StudentBusStopID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "StudentBusStop", objectId = StudentBusStopID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a StudentBusStop
#'
#' This function deletes a StudentBusStop
#' @param StudentBusStopID The ID of the StudentBusStop to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The StudentBusStopID of the deleted StudentBusStop.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteStudentBusStop <- function(StudentBusStopID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "StudentBusStop", objectId = StudentBusStopID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a StudentBusStop
#'
#' This function creates a StudentBusStop
#' @param fieldNames The field values to give the created StudentBusStop. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created StudentBusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createStudentBusStop <- function(BusStopID = NULL, IsFriday = NULL, IsMonday = NULL, IsSaturday = NULL, IsSunday = NULL, IsThursday = NULL, IsTuesday = NULL, IsWednesday = NULL, StopType = NULL, StudentID = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "StudentBusStop", body = list(DataObject = body), searchFields = append("StudentBusStopID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a StudentBusStop
#'
#' This function modifies a StudentBusStop
#' @param fieldNames The field values to give the modified StudentBusStop. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified StudentBusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyStudentBusStop <- function(StudentBusStopID, BusStopID = NULL, IsFriday = NULL, IsMonday = NULL, IsSaturday = NULL, IsSunday = NULL, IsThursday = NULL, IsTuesday = NULL, IsWednesday = NULL, StopType = NULL, StudentID = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "StudentBusStop", objectId = StudentBusStopID, body = list(DataObject = body), searchFields = append("StudentBusStopID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List TempStudentBusStops
#'
#' This function returns a dataframe or json object of TempStudentBusStops
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TempStudentBusStops. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TempStudentBusStops.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TempStudentBusStop') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of TempStudentBusStops
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listTempStudentBusStops <- function(searchConditionsList = NULL, BusStopArrivalTime = F, BusStopDescription = F, BusStopFullAddress = F, BusStopID = F, CreatedTime = F, Exceptions = F, HasExceptions = F, IsAccepted = F, ModifiedTime = F, StudentBusStopID = F, StudentID = F, StudentNameLFM = F, StudentNumber = F, TempStudentBusStopID = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "TempStudentBusStop", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a TempStudentBusStop
#'
#' This function returns a dataframe or json object of a TempStudentBusStop
#' @param TempStudentBusStopID The ID of the TempStudentBusStop to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TempStudentBusStop. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TempStudentBusStop.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TempStudentBusStop') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of TempStudentBusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getTempStudentBusStop <- function(TempStudentBusStopID, BusStopArrivalTime = F, BusStopDescription = F, BusStopFullAddress = F, BusStopID = F, CreatedTime = F, Exceptions = F, HasExceptions = F, IsAccepted = F, ModifiedTime = F, StudentBusStopID = F, StudentID = F, StudentNameLFM = F, StudentNumber = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "TempStudentBusStopID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "TempStudentBusStop", objectId = TempStudentBusStopID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a TempStudentBusStop
#'
#' This function deletes a TempStudentBusStop
#' @param TempStudentBusStopID The ID of the TempStudentBusStop to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The TempStudentBusStopID of the deleted TempStudentBusStop.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteTempStudentBusStop <- function(TempStudentBusStopID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "TempStudentBusStop", objectId = TempStudentBusStopID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a TempStudentBusStop
#'
#' This function creates a TempStudentBusStop
#' @param fieldNames The field values to give the created TempStudentBusStop. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created TempStudentBusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createTempStudentBusStop <- function(BusStopArrivalTime = NULL, BusStopDescription = NULL, BusStopFullAddress = NULL, Exceptions = NULL, IsAccepted = NULL, StudentNameLFM = NULL, StudentNumber = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "TempStudentBusStop", body = list(DataObject = body), searchFields = append("TempStudentBusStopID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a TempStudentBusStop
#'
#' This function modifies a TempStudentBusStop
#' @param fieldNames The field values to give the modified TempStudentBusStop. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified TempStudentBusStop
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyTempStudentBusStop <- function(TempStudentBusStopID, BusStopArrivalTime = NULL, BusStopDescription = NULL, BusStopFullAddress = NULL, Exceptions = NULL, IsAccepted = NULL, StudentNameLFM = NULL, StudentNumber = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "TempStudentBusStop", objectId = TempStudentBusStopID, body = list(DataObject = body), searchFields = append("TempStudentBusStopID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List TransportationConfigDistricts
#'
#' This function returns a dataframe or json object of TransportationConfigDistricts
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TransportationConfigDistricts. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TransportationConfigDistricts.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TransportationConfigDistrict') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of TransportationConfigDistricts
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listTransportationConfigDistricts <- function(searchConditionsList = NULL, ConfigDistrictID = F, CreatedTime = F, DistrictID = F, FileDestinationIDTransportationImport = F, ImportFileType = F, ModifiedTime = F, RowsToSkip = F, TransportationImportFileName = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "ConfigDistrict", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a TransportationConfigDistrict
#'
#' This function returns a dataframe or json object of a TransportationConfigDistrict
#' @param TransportationConfigDistrictID The ID of the TransportationConfigDistrict to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TransportationConfigDistrict. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TransportationConfigDistrict.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TransportationConfigDistrict') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of TransportationConfigDistrict
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getTransportationConfigDistrict <- function(TransportationConfigDistrictID, ConfigDistrictID = F, CreatedTime = F, DistrictID = F, FileDestinationIDTransportationImport = F, ImportFileType = F, ModifiedTime = F, RowsToSkip = F, TransportationImportFileName = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "TransportationConfigDistrictID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "ConfigDistrict", objectId = TransportationConfigDistrictID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a TransportationConfigDistrict
#'
#' This function deletes a TransportationConfigDistrict
#' @param TransportationConfigDistrictID The ID of the TransportationConfigDistrict to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The TransportationConfigDistrictID of the deleted TransportationConfigDistrict.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteTransportationConfigDistrict <- function(TransportationConfigDistrictID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "ConfigDistrict", objectId = TransportationConfigDistrictID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a TransportationConfigDistrict
#'
#' This function creates a TransportationConfigDistrict
#' @param fieldNames The field values to give the created TransportationConfigDistrict. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created TransportationConfigDistrict
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createTransportationConfigDistrict <- function(DistrictID = NULL, FileDestinationIDTransportationImport = NULL, ImportFileType = NULL, RowsToSkip = NULL, TransportationImportFileName = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "ConfigDistrict", body = list(DataObject = body), searchFields = append("ConfigDistrictID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a TransportationConfigDistrict
#'
#' This function modifies a TransportationConfigDistrict
#' @param fieldNames The field values to give the modified TransportationConfigDistrict. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified TransportationConfigDistrict
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyTransportationConfigDistrict <- function(ConfigDistrictID, DistrictID = NULL, FileDestinationIDTransportationImport = NULL, ImportFileType = NULL, RowsToSkip = NULL, TransportationImportFileName = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "ConfigDistrict", objectId = ConfigDistrictID, body = list(DataObject = body), searchFields = append("ConfigDistrictID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List TempStudentTransportations
#'
#' This function returns a dataframe or json object of TempStudentTransportations
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TempStudentTransportations. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TempStudentTransportations.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TempStudentTransportation') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of TempStudentTransportations
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listTempStudentTransportations <- function(searchConditionsList = NULL, CreatedTime = F, Exceptions = F, HasExceptions = F, ModifiedTime = F, StartDate = F, StudentID = F, StudentNameLFM = F, StudentNumber = F, StudentTransportationID = F, TempStudentTransportationID = F, TransportationCategoryDescription = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "TempStudentTransportation", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a TempStudentTransportation
#'
#' This function returns a dataframe or json object of a TempStudentTransportation
#' @param TempStudentTransportationID The ID of the TempStudentTransportation to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TempStudentTransportation. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TempStudentTransportation.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TempStudentTransportation') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of TempStudentTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getTempStudentTransportation <- function(TempStudentTransportationID, CreatedTime = F, Exceptions = F, HasExceptions = F, ModifiedTime = F, StartDate = F, StudentID = F, StudentNameLFM = F, StudentNumber = F, StudentTransportationID = F, TransportationCategoryDescription = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "TempStudentTransportationID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "TempStudentTransportation", objectId = TempStudentTransportationID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a TempStudentTransportation
#'
#' This function deletes a TempStudentTransportation
#' @param TempStudentTransportationID The ID of the TempStudentTransportation to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The TempStudentTransportationID of the deleted TempStudentTransportation.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteTempStudentTransportation <- function(TempStudentTransportationID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "TempStudentTransportation", objectId = TempStudentTransportationID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a TempStudentTransportation
#'
#' This function creates a TempStudentTransportation
#' @param fieldNames The field values to give the created TempStudentTransportation. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created TempStudentTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createTempStudentTransportation <- function(Exceptions = NULL, StartDate = NULL, StudentID = NULL, StudentNameLFM = NULL, StudentNumber = NULL, TransportationCategoryDescription = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "TempStudentTransportation", body = list(DataObject = body), searchFields = append("TempStudentTransportationID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a TempStudentTransportation
#'
#' This function modifies a TempStudentTransportation
#' @param fieldNames The field values to give the modified TempStudentTransportation. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified TempStudentTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyTempStudentTransportation <- function(TempStudentTransportationID, Exceptions = NULL, StartDate = NULL, StudentID = NULL, StudentNameLFM = NULL, StudentNumber = NULL, TransportationCategoryDescription = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "TempStudentTransportation", objectId = TempStudentTransportationID, body = list(DataObject = body), searchFields = append("TempStudentTransportationID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List TempTransportations
#'
#' This function returns a dataframe or json object of TempTransportations
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TempTransportations. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TempTransportations.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TempTransportation') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of TempTransportations
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listTempTransportations <- function(searchConditionsList = NULL, ArrivalTime = F, Bus = F, BusRoute = F, BusStop = F, BusStopAddress = F, CreatedTime = F, Days = F, Driver = F, Exceptions = F, FirstName = F, GradeLevel = F, HasExceptions = F, LastName = F, ModifiedTime = F, School = F, StopType = F, StudentAddress = F, StudentNumber = F, TempTransportationID = F, TransportationCategory = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "TempTransportation", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a TempTransportation
#'
#' This function returns a dataframe or json object of a TempTransportation
#' @param TempTransportationID The ID of the TempTransportation to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given TempTransportation. Defaults to FALSE for all return fields which, for convenience, returns all fields for the TempTransportation.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('TempTransportation') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of TempTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getTempTransportation <- function(TempTransportationID, ArrivalTime = F, Bus = F, BusRoute = F, BusStop = F, BusStopAddress = F, CreatedTime = F, Days = F, Driver = F, Exceptions = F, FirstName = F, GradeLevel = F, HasExceptions = F, LastName = F, ModifiedTime = F, School = F, StopType = F, StudentAddress = F, StudentNumber = F, TransportationCategory = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "TempTransportationID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "TempTransportation", objectId = TempTransportationID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a TempTransportation
#'
#' This function deletes a TempTransportation
#' @param TempTransportationID The ID of the TempTransportation to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The TempTransportationID of the deleted TempTransportation.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteTempTransportation <- function(TempTransportationID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "TempTransportation", objectId = TempTransportationID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a TempTransportation
#'
#' This function creates a TempTransportation
#' @param fieldNames The field values to give the created TempTransportation. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created TempTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createTempTransportation <- function(ArrivalTime = NULL, Bus = NULL, BusRoute = NULL, BusStop = NULL, BusStopAddress = NULL, Days = NULL, Driver = NULL, Exceptions = NULL, FirstName = NULL, GradeLevel = NULL, HasExceptions = NULL, LastName = NULL, School = NULL, StopType = NULL, StudentAddress = NULL, StudentNumber = NULL, TransportationCategory = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "TempTransportation", body = list(DataObject = body), searchFields = append("TempTransportationID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a TempTransportation
#'
#' This function modifies a TempTransportation
#' @param fieldNames The field values to give the modified TempTransportation. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified TempTransportation
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyTempTransportation <- function(TempTransportationID, ArrivalTime = NULL, Bus = NULL, BusRoute = NULL, BusStop = NULL, BusStopAddress = NULL, Days = NULL, Driver = NULL, Exceptions = NULL, FirstName = NULL, GradeLevel = NULL, HasExceptions = NULL, LastName = NULL, School = NULL, StopType = NULL, StudentAddress = NULL, StudentNumber = NULL, TransportationCategory = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "TempTransportation", objectId = TempTransportationID, body = list(DataObject = body), searchFields = append("TempTransportationID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List ImportColumns
#'
#' This function returns a dataframe or json object of ImportColumns
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given ImportColumns. Defaults to FALSE for all return fields which, for convenience, returns all fields for the ImportColumns.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('ImportColumn') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A list of ImportColumns
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listImportColumns <- function(searchConditionsList = NULL, ColumnNumber = F, ConfigDistrictID = F, CreatedTime = F, DefaultValue = F, FieldMapping = F, ImportColumnID = F, ModifiedTime = F, StopNumber = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Transportation", objectName = "ImportColumn", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get an ImportColumn
#'
#' This function returns a dataframe or json object of an ImportColumn
#' @param ImportColumnID The ID of the ImportColumn to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given ImportColumn. Defaults to FALSE for all return fields which, for convenience, returns all fields for the ImportColumn.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('ImportColumn') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A dataframe or of ImportColumn
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getImportColumn <- function(ImportColumnID, ColumnNumber = F, ConfigDistrictID = F, CreatedTime = F, DefaultValue = F, FieldMapping = F, ModifiedTime = F, StopNumber = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "ImportColumnID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Transportation", objectName = "ImportColumn", objectId = ImportColumnID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete an ImportColumn
#'
#' This function deletes an ImportColumn
#' @param ImportColumnID The ID of the ImportColumn to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The ImportColumnID of the deleted ImportColumn.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteImportColumn <- function(ImportColumnID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Transportation", objectName = "ImportColumn", objectId = ImportColumnID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create an ImportColumn
#'
#' This function creates an ImportColumn
#' @param fieldNames The field values to give the created ImportColumn. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return A newly created ImportColumn
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createImportColumn <- function(ColumnNumber = NULL, ConfigDistrictID = NULL, DefaultValue = NULL, FieldMapping = NULL, StopNumber = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Transportation", objectName = "ImportColumn", body = list(DataObject = body), searchFields = append("ImportColumnID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify an ImportColumn
#'
#' This function modifies an ImportColumn
#' @param fieldNames The field values to give the modified ImportColumn. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Transportation
#' @return The modified ImportColumn
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyImportColumn <- function(ImportColumnID, ColumnNumber = NULL, ConfigDistrictID = NULL, DefaultValue = NULL, FieldMapping = NULL, StopNumber = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Transportation", objectName = "ImportColumn", objectId = ImportColumnID, body = list(DataObject = body), searchFields = append("ImportColumnID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.