Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBViewerAPI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SI-Projekt
MediaDBViewerAPI
Commits
10516467
Commit
10516467
authored
Jan 11, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Viele Kleinigkeiten u.a.
parent
d205b49d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
api.class.php
api.class.php
+14
-4
No files found.
api.class.php
View file @
10516467
...
...
@@ -6,17 +6,27 @@
class
MediaDBViewerAPI
{
private
$API_KEY
;
private
$API_start_time
;
function
__construct
(
$KEY
)
{
if
(
isset
(
$KEY
)
AND
strlen
(
$KEY
)
==
10
){
function
__construct
(){
$API_start_time
=
microtime
(
true
);
}
function
APIinit
(
$KEY
)
{
if
(
isset
(
$KEY
)
AND
strlen
(
$KEY
)
==
API_KEY_LEN
){
$API_KEY
=
$KEY
;
$ret
=
fals
e
;
$ret
=
tru
e
;
}
else
{
$ret
=
false
;
}
return
$ret
;
}
function
APIrespons
(
$respons
=
""
){
return
array
(
"API_VERSION"
=>
API_VERSION
,
"API_KEY"
=>
$API_KEY
,
"API_Laufzeit"
=>
(
$API_start_time
-
microtime
(
true
)),
"Antwort"
=>
$respons
);
}
function
error
(
$ErrID
){
switch
(
$ErrID
)
{
case
1001
:
...
...
@@ -25,7 +35,7 @@ class MediaDBViewerAPI{
break
;
case
1002
:
return
array
(
"FehlerID"
=>
$ErrID
,
"FehlerText"
=>
"Es wurde kein bzw. kein g
�ltiger API_KEY �
bergeben!"
);
"FehlerText"
=>
"Es wurde kein bzw. kein g
ültiger API_KEY ü
bergeben!"
);
break
;
default
:
...
...
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