Skip to content

Commit 96fed53

Browse files
committed
Cleanup syntax and spacing
1 parent 7aea466 commit 96fed53

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/omniauth/strategies/snapchat.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ class Snapchat < OmniAuth::Strategies::OAuth2
88
option :name, "snapchat"
99

1010
option :client_options, {
11-
:site => 'https://adsapi.snapchat.com',
12-
:authorize_url => 'https://accounts.snapchat.com/login/oauth2/authorize',
13-
:token_url => 'https://accounts.snapchat.com/accounts/oauth2/token'
11+
site: "https://adsapi.snapchat.com",
12+
authorize_url: "https://accounts.snapchat.com/login/oauth2/authorize",
13+
token_url: "https://accounts.snapchat.com/accounts/oauth2/token"
1414
}
1515

16-
uid{ raw_info['me']['externalId'] }
16+
uid { raw_info["me"]["externalId"] }
1717

1818
info do
1919
{
20-
name: raw_info['me']['displayName'],
21-
image: raw_info['me']['bitmoji']['avatar']
20+
name: raw_info["me"]["displayName"],
21+
image: raw_info["me"]["bitmoji"]["avatar"]
2222
}
2323
end
2424

2525
extra do
2626
{
27-
'raw_info' => raw_info
27+
"raw_info" => raw_info
2828
}
2929
end
3030

31+
# After back and forth with snapchat support team, using the GraphQL
32+
# endpoint seems the easiest.
3133
def raw_info
32-
# After back and forth with snapchat support team, using the GraphQL
33-
# endpoint seems the easiest.
3434
raw_info_url = "https://kit.snapchat.com/v1/me?query=%7Bme%7BexternalId%2C+displayName%2C+bitmoji%7Bavatar%7D%7D%7D"
3535
@raw_info ||= access_token.get(raw_info_url).parsed["data"]
3636
end
@@ -42,10 +42,10 @@ def callback_url
4242
def token_params
4343
authorization = Base64.strict_encode64("#{options.client_id}:#{options.client_secret}")
4444
super.merge({
45-
headers: {
46-
'Authorization' => "Basic #{authorization}"
47-
}
48-
})
45+
headers: {
46+
"Authorization" => "Basic #{authorization}"
47+
}
48+
})
4949
end
5050
end
5151
end

0 commit comments

Comments
 (0)