PasswordPusher Alfred Workflow: Configurable days/views
This file contains 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
#!/usr/bin/env ruby | |
require "net/http" | |
require "uri" | |
require "json" | |
uri = URI.parse("https://pwpush.com/p.json") | |
data = {} | |
data["password[payload]"] = "{query}" | |
# Max 90 days | |
data["password[expire_after_days]"] = "7" | |
# Max 100 views | |
data["password[expire_after_views]"] = "5" | |
r = Net::HTTP.post_form(uri, data) | |
puts JSON.parse(r.body)["url_token"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment