diff --git a/MySpeed/MySpeed.php b/MySpeed/MySpeed.php new file mode 100644 index 0000000000..6b55fb512a --- /dev/null +++ b/MySpeed/MySpeed.php @@ -0,0 +1,43 @@ +url('api/info/version')); + echo $test->status; + } + + public function livestats() + { + $status = 'inactive'; + $res = parent::execute($this->url('api/speedtests/statistics')); + $details = json_decode($res->getBody()); + + $data = []; + + if ($details) { + $status = 'active'; + $data = [ + 'avg_down' => floor($details->download->avg), + 'avg_up' => floor($details->upload->avg) + + ]; + } + + return parent::getLiveStats($status, $data); + } + + public function url($endpoint) + { + $api_url = parent::normaliseurl($this->config->url) . $endpoint; + return $api_url; + } +} diff --git a/MySpeed/app.json b/MySpeed/app.json new file mode 100644 index 0000000000..6738e1fac1 --- /dev/null +++ b/MySpeed/app.json @@ -0,0 +1,10 @@ +{ + "appid": "ac2f9c8aee6a960204b0fb387d33185679217db2", + "name": "MySpeed", + "website": "https://myspeed.dev", + "license": "MIT License", + "description": "MySpeed is a speed test analysis software that records your internet speed for up to 30 days.", + "enhanced": true, + "tile_background": "dark", + "icon": "myspeed.png" +} \ No newline at end of file diff --git a/MySpeed/config.blade.php b/MySpeed/config.blade.php new file mode 100644 index 0000000000..4505127af7 --- /dev/null +++ b/MySpeed/config.blade.php @@ -0,0 +1,11 @@ +

{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')

+
+
+ + {!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!} +
+
+ +
+
+ diff --git a/MySpeed/livestats.blade.php b/MySpeed/livestats.blade.php new file mode 100644 index 0000000000..2717f52636 --- /dev/null +++ b/MySpeed/livestats.blade.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/MySpeed/myspeed.png b/MySpeed/myspeed.png new file mode 100644 index 0000000000..076418d546 Binary files /dev/null and b/MySpeed/myspeed.png differ