Skip to content
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

Update README.md #120

Merged
merged 5 commits into from
Oct 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 47 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@ A Ruby interface to the [App Store Connect API](https://developer.apple.com/app-

Add this line to your application's Gemfile:

```ruby
```Ruby
gem 'app_store_connect'
```

And then execute:

$ bundle
```Bash
$ bundle
```

Or install it yourself as:

$ gem install app_store_connect
```Bash
$ gem install app_store_connect
```

## Usage

```ruby
```ruby
AppStoreConnect.config = {
issuer_id: issuer_id,
key_id: key_id,
private_key: private_key
issuer_id: 'issuer_id',
key_id: 'key_id',
private_key: File.read(File.new("/Path/AuthKey.p8"))
}

app_store_connect = AppStoreConnect::Client.new
Expand Down Expand Up @@ -58,6 +62,42 @@ app_store_connect.sales_reports(
)
```

### Fetch All Devices

```ruby

fetchAllDevices = app_store_connect.devices
puts JSON.pretty_generate(fetchAllDevice)

```

### Register a New Device

```ruby
result = app_store_connect.create_device(
name: 'name',
platform: 'IOS',
udid: 'udid'
)

puts JSON.pretty_generate(result)
```


## Q&A

### How to understand the `devices, sales_reports, create_bundle_id` keyword seen in the demo?

It's function key from `schema.json` file.

### How to understand `()` in the demo, and when should use it? eg: `create_bundle_id()`, `sales_reports()`

`()` is mean: you have mapped to `http_body_type` in file `schema.json`

### How to set this content in `()`

`http_body_type` have a value type. Based on this value, we can find the definition of the relevant configuration in the source code of ruby.

## Development

After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests. You can also run `rake console` for an interactive prompt that will allow you to experiment.
Expand Down