Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
Poduptime
Commits
826e9eb6
Commit
826e9eb6
authored
Jan 26, 2019
by
David Morley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove old api file
parent
c6ffb1fb
Pipeline
#1056
passed with stage
in 2 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
47 deletions
+2
-47
CHANGELOG.md
CHANGELOG.md
+2
-0
api-more.php
db/api-more.php
+0
-47
No files found.
CHANGELOG.md
View file @
826e9eb6
...
...
@@ -3,8 +3,10 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
## [Unreleased]
### Added
-
osada version check
### Changed
### Deprecated
-
api-more.php calls. old droid app been dead for years
### Removed
### Fixed
### Security
...
...
db/api-more.php
deleted
100644 → 0
View file @
c6ffb1fb
<?php
/**
* This is just a single API for a pod for the Android app to get data.
*/
declare
(
strict_types
=
1
);
use
Poduptime\PodStatus
;
use
RedBeanPHP\R
;
// Required parameters.
(
$_domain
=
$_GET
[
'domain'
]
??
null
)
||
die
(
'no domain given'
);
// Other parameters.
$_format
=
$_GET
[
'format'
]
??
''
;
require_once
__DIR__
.
'/../boot.php'
;
try
{
$pod
=
R
::
getRow
(
'
SELECT hgitdate, id, domain, status, secure, score, userrating, adminrating, city, state, country, lat, long, ip, ipv6, pingdomurl, monthsmonitored, uptimelast7, responsetimelast7, local_posts, comment_counts, dateCreated, dateUpdated, dateLaststats, hidden
FROM pods_apiv1
WHERE domain = ?
'
,
[
$_domain
]);
}
catch
(
\RedBeanPHP\RedException
$e
)
{
die
(
'Error in SQL query: '
.
$e
->
getMessage
());
}
if
(
$_format
===
'json'
)
{
echo
json_encode
(
$pod
);
}
else
{
if
(
$pod
[
'status'
]
===
PodStatus
::
UP
)
{
echo
'Status: Up<br>'
;
}
if
(
$pod
[
'status'
]
===
PodStatus
::
DOWN
)
{
echo
'Status: Down<br>'
;
}
echo
'Last Git Pull: '
.
$pod
[
'hgitdate'
]
.
'<br>'
;
echo
'Uptime This Month '
.
$pod
[
'uptimelast7'
]
.
'<br>'
;
echo
'Months Monitored: '
.
$pod
[
'monthsmonitored'
]
.
'<br>'
;
echo
'Response Time: '
.
$pod
[
'responsetimelast7'
]
.
'<br>'
;
echo
'User Rating: '
.
$pod
[
'userrating'
]
.
'<br>'
;
echo
'Server Location: '
.
$pod
[
'country'
]
.
'<br>'
;
echo
'Latitude: '
.
$pod
[
'lat'
]
.
'<br>'
;
echo
'Longitude: '
.
$pod
[
'long'
]
.
'<br>'
;
}
Write
Preview
Markdown
is supported
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