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
bf73f011
Commit
bf73f011
authored
Jan 11, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vorbereitung auf Action call
parent
5241e187
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
api.class.php
api.class.php
+7
-3
api.php
api.php
+6
-1
No files found.
api.class.php
View file @
bf73f011
...
...
@@ -9,7 +9,7 @@ class MediaDBViewerAPI{
function
APIinit
(
$KEY
)
{
if
(
isset
(
$KEY
)
AND
strlen
(
$KEY
)
==
API_KEY_LEN
){
$API_KEY
=
$KEY
;
$
this
->
API_KEY
=
$KEY
;
$ret
=
true
;
}
else
{
...
...
@@ -17,10 +17,10 @@ class MediaDBViewerAPI{
}
return
$ret
;
}
function
APIrespons
(
$Laufzeit
=
0
,
$respons
=
""
){
return
array
(
"API_VERSION"
=>
API_VERSION
,
"API_KEY"
=>
$API_KEY
,
"API_KEY"
=>
$
this
->
API_KEY
,
"API_Laufzeit"
=>
$Laufzeit
,
"Antwort"
=>
$respons
);
}
...
...
@@ -34,6 +34,10 @@ class MediaDBViewerAPI{
return
array
(
"FehlerID"
=>
$ErrID
,
"FehlerText"
=>
"Es wurde kein bzw. kein gültiger API_KEY übergeben!"
);
break
;
case
1003
:
return
array
(
"FehlerID"
=>
$ErrID
,
"FehlerText"
=>
"Die gewünschte 'action' "
.
$_GET
[
'action'
]
.
" exisitiert nicht!"
);
break
;
default
:
return
array
(
"FehlerID"
=>
1000
,
...
...
api.php
View file @
bf73f011
...
...
@@ -18,7 +18,12 @@ define(API_VERSION, 0.001);
$API
=
new
MediaDBViewerAPI
();
if
(
$API
->
APIinit
(
$_GET
[
'KEY'
])){
$respons
=
$API
->
error
(
1001
);
if
(
method_exists
(
'MediaDBViewerAPI'
,
'API_'
.
$_GET
[
'action'
])){
$respons
=
$API
->
error
(
1001
);
}
else
{
$respons
=
$API
->
error
(
1003
);
}
}
else
{
...
...
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