Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/rgtmxPublic

An R client for GTmetrix

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
License.md
NotificationsYou must be signed in to change notification settings

rrmn/rgtmx

Repository files navigation

R-CMD-check

Description

An R client for GTmetrix

Context

This is a convenience wrapper for the GTmetrix API 2.0.

I whipped up a small library to talk to GTmetrix via R. There's some basic sanity checking baked in, but obviously this is still work in progress and there are (potentially critical) bugs. Feel free to check it out, though. If you need help, take a look at the manuals. A good point to start is?start_test.

If you have feedback and/or points for improvement, feel free to open an issue / PR here on Github. I would love to hear from you!

Roman

Usage

Installation

CRAN:

# Install and load library.install.packages("rgtmx")library(rgtmx)

Development version:

# Install and load library.devtools::install_github("RomanAbashin/rgtmx")library(rgtmx)

Start test (and get results)

Minimal example #1

# Returns the final report (after checking for completion roughly every 3 seconds).result<- start_test("google.com","[API_KEY]")

This will start a test and wait for the report to be generated, returning the result as data.frame. Optionally, you can just simply return the test ID and other meta data via the parameterwait_for_completion = FALSE.

Minimal example #2

# Returns just the test ID and some meta data. Does not wait for report completion.result<- start_test("google.com","[API_KEY]",wait_for_completion=FALSE)

Optional parameters

Other optional parameters are:location,browser,report,retention,httpauth_username,httpauth_password,adblock,cookies,video,stop_onload,throttle,allow_url,block_url,dns,simulate_device,user_agent,browser_width,browser_height,browser_dppx,browser_rotate.

Please consult the manual via?start_test or the GTmetrix API documentation for further information.

Locations

# Show available locationsshow_available_locations("[API_KEY]")# Get location detailsget_location_details(location_id=1,"[API_KEY]")

Browsers

# Show available browsersshow_available_browsers("[API_KEY]")# Get browser detailsget_browser_details(browser_id=3, [API_KEY]")

Tests / Reports

# Get specific testget_test("[TEST_ID]","[API_KEY]")# Get specific reportget_report("[REPORT_ID]","[API_KEY]")# Get all testsget_all_tests("[API_KEY]")

Account

# Get account status and available creditsget_account_status("[API_KEY]")

About

An R client for GTmetrix

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
License.md

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp