Reviewer:
1. DM me to get a client ID/secret for the Hubspot app and login
credentials for a sample Hubspot account
2. For now, you'll need to run the engine on the branch
`nate/token-introspection` for the auth flow to work with Hubspot
3. Add the following to `auth.providers` in your engine yaml:
```yaml
- id: arcade-hubspot
description: 'Hubspot provider'
enabled: true
type: oauth2
provider_id: hubspot
client_id: ${env:HUBSPOT_CLIENT_ID}
client_secret: ${env:HUBSPOT_CLIENT_SECRET}
```
9 lines
298 B
Python
9 lines
298 B
Python
from typing import Any
|
|
|
|
from arcade.sdk.eval import BinaryCritic
|
|
|
|
|
|
class ValueInListCritic(BinaryCritic):
|
|
def evaluate(self, expected: list[Any], actual: Any) -> dict[str, float | bool]:
|
|
match = actual in expected
|
|
return {"match": match, "score": self.weight if match else 0.0}
|