-
-
Notifications
You must be signed in to change notification settings - Fork 331
Added the app MySpeed #827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <?php | ||
|
|
||
| namespace App\SupportedApps\MySpeed; | ||
|
|
||
| class MySpeed extends \App\SupportedApps implements \App\EnhancedApps | ||
| { | ||
|
|
||
| public $config; | ||
|
|
||
| //protected $login_first = true; // Uncomment if api requests need to be authed first | ||
| //protected $method = 'POST'; // Uncomment if requests to the API should be set by POST | ||
|
|
||
| public function __construct() | ||
| { | ||
| //$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set | ||
| } | ||
|
|
||
| public function test() | ||
| { | ||
| $test = parent::appTest($this->url('status')); | ||
| echo $test->status; | ||
| } | ||
|
|
||
| public function livestats() | ||
| { | ||
| $status = 'inactive'; | ||
| $res = parent::execute($this->url('status')); | ||
| $details = json_decode($res->getBody()); | ||
|
|
||
| $data = []; | ||
| return parent::getLiveStats($status, $data); | ||
|
|
||
| } | ||
|
|
||
| public function url($endpoint) | ||
| { | ||
| $api_url = parent::normaliseurl($this->config->url).$endpoint; | ||
| return $api_url; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2> | ||
| <div class="items"> | ||
| <div class="input"> | ||
| <label>{{ strtoupper(__('app.url')) }}</label> | ||
| {!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!} | ||
| </div> | ||
| <div class="input"> | ||
| <label>{{ __('app.apps.username') }}</label> | ||
| {!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!} | ||
| </div> | ||
| <div class="input"> | ||
| <label>{{ __('app.apps.password') }}</label> | ||
| {!! Form::input('password', 'config[password]', '', ['placeholder' => __('app.apps.password'), 'data-config' => 'password', 'class' => 'form-control config-item']) !!} | ||
| </div> | ||
| <div class="input"> | ||
| <button style="margin-top: 32px;" class="btn test" id="test_config">Test</button> | ||
| </div> | ||
| </div> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <ul class="livestats"> | ||
| <li> | ||
| <span class="title">Queue</span> | ||
| <strong>{!! $queue_size !!}</strong> | ||
| </li> | ||
| <li> | ||
| <span class="title">Speed</span> | ||
| <strong>{!! $current_speed !!}</strong> | ||
| </li> | ||
| </ul> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <?php | ||
|
|
||
| namespace App\SupportedApps\Pinchflat; | ||
|
|
||
| class Pinchflat extends \App\SupportedApps implements \App\EnhancedApps | ||
| { | ||
|
|
||
| public $config; | ||
|
|
||
| //protected $login_first = true; // Uncomment if api requests need to be authed first | ||
| //protected $method = 'POST'; // Uncomment if requests to the API should be set by POST | ||
|
|
||
| public function __construct() | ||
| { | ||
| //$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set | ||
| } | ||
|
|
||
| public function test() | ||
| { | ||
| $test = parent::appTest($this->url('status')); | ||
| echo $test->status; | ||
| } | ||
|
|
||
| public function livestats() | ||
| { | ||
| $status = 'inactive'; | ||
| $res = parent::execute($this->url('status')); | ||
| $details = json_decode($res->getBody()); | ||
|
|
||
| $data = []; | ||
| return parent::getLiveStats($status, $data); | ||
|
|
||
| } | ||
|
|
||
| public function url($endpoint) | ||
| { | ||
| $api_url = parent::normaliseurl($this->config->url).$endpoint; | ||
| return $api_url; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "appid": "24301c5e991ab307ddbc92673d2b1f4b501964a9", | ||
| "name": "Pinchflat", | ||
| "website": "https://github.com/kieraneglin/pinchflat", | ||
| "license": "GNU Affero General Public License v3.0 or later", | ||
| "description": "Pinchflat is a self-hosted app for downloading YouTube content built using yt-dlp. It's designed to be lightweight, self-contained, and easy to use. You set up rules for how to download content from YouTube channels or playlists and it'll do the rest, periodically checking for new content.", | ||
| "enhanced": true, | ||
| "tile_background": "dark", | ||
| "icon": "pinchflat.png" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2> | ||
| <div class="items"> | ||
| <div class="input"> | ||
| <label>{{ strtoupper(__('app.url')) }}</label> | ||
| {!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!} | ||
| </div> | ||
| <div class="input"> | ||
| <label>{{ __('app.apps.username') }}</label> | ||
| {!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!} | ||
| </div> | ||
| <div class="input"> | ||
| <label>{{ __('app.apps.password') }}</label> | ||
| {!! Form::input('password', 'config[password]', '', ['placeholder' => __('app.apps.password'), 'data-config' => 'password', 'class' => 'form-control config-item']) !!} | ||
| </div> | ||
| <div class="input"> | ||
| <button style="margin-top: 32px;" class="btn test" id="test_config">Test</button> | ||
| </div> | ||
| </div> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <ul class="livestats"> | ||
| <li> | ||
| <span class="title">Queue</span> | ||
| <strong>{!! $queue_size !!}</strong> | ||
| </li> | ||
| <li> | ||
| <span class="title">Speed</span> | ||
| <strong>{!! $current_speed !!}</strong> | ||
| </li> | ||
| </ul> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why add this? Doesn't seem to be used.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am using MySpeed but there is no app in Heimdall for it. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you just copied the default from the enhanced templatr. If you don't use it, don't include it.