flexiodata / flexio-web-app

Flex.io Web App
https://www.flex.io/app
MIT License
5 stars 2 forks source link

DISCUSSION: Documentation - Function Naming Conventions #567

Open wanderslth opened 5 years ago

wanderslth commented 5 years ago

This issue is for discussing function naming conventions. Some goals:

Here are a list of the slugs for all of our current functions:

/cb-organizations", query
/cb-people", query
/intercom-user-lookup", email
/intercom-user-list", days
/intercom-event-list", user_id
/hubspot-contacts")
/wikipedia", search)
/currency-converter", amt, cur1, cur2, [date]
/currency-rates", cur, [date]

Thoughts:

/cb-enrich-org", query
/cb-enrich-people", query
/cb-lookup-org", query
/cb-lkup-people", query
/cb-list-investors, company
/cb-lst-events, company
/cb-convert-domain, name
/cb-enrich-org", query
/cb-enrich-people", query
/cb-enrich-org", name
/cb-enrich-people", name

Following that, in parameter for the the org lookup, it currently says

Property Type Description Required
query string Query string to use when searching for organizations true

But, this is not super clarifying to the end user, as it doesn't tell them to actually use the org name. A revision:

Property Type Description Required
name string name of the organization true

or, if you offered domain names as an option in the query:

Property Type Description Required
name string name or domain name of the organization true

Then, to further clarify in the sample usage, you give one of each:

=FLEX("YOUR_TEAM_NAME/cb-organizations", "crunchbase")
=FLEX("YOUR_TEAM_NAME/cb-organizations", "microsoft.com")

Summary:

I think we probably could come down to a basic three-tier naming convention (unless it's overkill):

servicename-type-descriptor

where we could utilize both abbreviations as well as clear descriptors/types

/cb-enrich-org", name
/int-enrich-user', email
/hub-list-leads"                     [note: I don't know what this one does?]
/wiki-enrich-description", title
/cur-convert", amt, cur1, cur2, [date]