Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
Poduptime
Commits
826e9eb6
Commit
826e9eb6
authored
Jan 26, 2019
by
dmorley
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
47 deletions
+2
-47
CHANGELOG.md
CHANGELOG.md
+2
-0
db/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
...
@@ -3,8 +3,10 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
## [Unreleased]
## [Unreleased]
### Added
### Added
-
osada version check
### Changed
### Changed
### Deprecated
### Deprecated
-
api-more.php calls. old droid app been dead for years
### Removed
### Removed
### Fixed
### Fixed
### Security
### 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