testflight_invite icon indicating copy to clipboard operation
testflight_invite copied to clipboard

Remove Tester

Open christocracy opened this issue 9 years ago • 3 comments

I wonder is it possible to implement #remove_tester?

christocracy avatar Jun 05 '15 13:06 christocracy

Nevermind, figured it out.

def remove_tester(email)
      login
      url = "/WebObjects/iTunesConnect.woa/ra/user/externalTesters/#{@app_id}/"

      params = { users: [{emailAddress: {errorKeys: [], value: email},
        firstName: {value: ''},
        lastName: {value: ';'},
        testing: {value: false}  # <------------ simply set value: false
      }]}

      response = request(url, :post, params.to_json)

      raise TestFlight::InviteDuplicateException.new if response.code.to_i == 500 # 500 if tester already exists... This is not how you HTTP, Apple.
      return JSON.parse(response.body)['statusCode']
    end

christocracy avatar Jun 05 '15 14:06 christocracy

Can you send a PR for this please?

Donohue avatar Jun 05 '15 14:06 Donohue

Hello, is your script still working ? thank you to replying

badrsony avatar Jun 04 '16 21:06 badrsony