Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alapu
alapur
Commits
ac4072ca
Commit
ac4072ca
authored
Apr 05, 2018
by
Jean-Marie Lepioufle
Browse files
add status function and gather some functions
parent
f03b8fdd
Changes
6
Hide whitespace changes
Inline
Side-by-side
NAMESPACE
View file @
ac4072ca
...
...
@@ -7,4 +7,5 @@ export(endpoints_alapu)
export(endpoints_package)
export(endpoints_session)
export(resp_content)
export(resp_status)
export(session_key)
R/session_key.R
deleted
100644 → 0
View file @
f03b8fdd
#' session_key
#' session_key
#' @param x alpu_post_res object
#' @keywords alapu
#' @export
#' @examples
#' \dontrun{
#' session_key()
#' }
session_key
<-
function
(
x
){
res
<-
httr
::
headers
(
x
)
$
`x-ocpu-session`
return
(
res
)
}
R/
resp_content
.R
→
R/
utils
.R
View file @
ac4072ca
#' resp_content
#' resp_content
...
...
@@ -16,3 +18,33 @@ resp_content <- function(x,as = NULL, type = NULL, encoding = NULL, ...){
res
<-
httr
::
content
(
x
,
as
=
as
,
type
=
type
,
encoding
=
encoding
,
...
)
return
(
res
)
}
#' session_key
#' session_key
#' @param x alpu_post_res object
#' @keywords alapu
#' @export
#' @examples
#' \dontrun{
#' session_key()
#' }
session_key
<-
function
(
x
){
res
<-
httr
::
headers
(
x
)
$
`x-ocpu-session`
return
(
res
)
}
#' resp_status
#' resp_status
#' @param x alpu_post_res object
#' @keywords alapu
#' @export
#' @examples
#' \dontrun{
#' resp_status()
#' }
resp_status
<-
function
(
x
){
res
<-
x
$
status_code
return
(
res
)
}
man/resp_content.Rd
View file @
ac4072ca
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/
resp_content
.R
% Please edit documentation in R/
utils
.R
\name{resp_content}
\alias{resp_content}
\title{resp_content
...
...
man/resp_status.Rd
0 → 100644
View file @
ac4072ca
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{resp_status}
\alias{resp_status}
\title{resp_status
resp_status}
\usage{
resp_status(x)
}
\arguments{
\item{x}{alpu_post_res object}
}
\description{
resp_status
resp_status
}
\examples{
\dontrun{
resp_status()
}
}
\keyword{alapu}
man/session_key.Rd
View file @
ac4072ca
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/
session_key
.R
% Please edit documentation in R/
utils
.R
\name{session_key}
\alias{session_key}
\title{session_key
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment