Sha256: 963ac9db3e87b2fe25029b963c2a38100fdfd7f9f51ca42dfa6c82d42f75094d
Contents?: true
Size: 893 Bytes
Versions: 8
Compression:
Stored size: 893 Bytes
Contents
module PortaText module Command module Api # The blacklist endpoint. # https://github.com/PortaText/docs/wiki/REST-API#api_blacklist # # Author:: Marcelo Gornstein (mailto:marcelog@portatext.com) # Copyright:: Copyright (c) 2015 PortaText # License:: Apache-2.0 class Blacklist < Base def number(number) set :number, number end def csv(file) set :file, file end def save_to(file) set :accept_file, file end def endpoint(_method) return 'blacklist/contacts' unless @args[:accept_file].nil? return 'blacklist/contacts' unless @args[:file].nil? return 'blacklist' if @args[:number].nil? number = @args[:number] @args.delete :number "blacklist/#{number}" end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems