I would love to see a port of this module to Drupal 8.

Here are some ideas:

1. Leverage composer and use the same library as the 7 version (its well maintained)
2. Write a Drupal-based service that wraps the logic of the SDK
3. Write a configuration form that stores the API key (possibly integrates with the Key module)

There are some similar examples to follow that I've worked on (both WIP):

1. Digital Ocean - https://www.drupal.org/sandbox/nerdstein/2942684
2. Vault - https://www.drupal.org/sandbox/nerdstein/2748693

I'm happy to work on this and/or maintain but would welcome ideas before getting started.

Comments

nerdstein created an issue. See original summary.

nerdstein’s picture

Title: Create a Drupal 8 » Create a Drupal 8 port
thejacer87’s picture

sounds good man, i added you to the maintainers list. this was made for a specific client. we are planning on doing a d8 upgrade sometime this year, so i will have time to work on the d8 port then. hopefully you make some good progress :)

nerdstein’s picture

Issue tags: +midcamp2018

Adding the new branch, which will be 8.x-1.x based on feature parity with 7 version

nerdstein’s picture

I'm going to push a base commit for the new branch

nerdstein’s picture

StatusFileSize
new1.16 KB
nerdstein’s picture

We need to do a full audit of functionality for 8.

At a minimum we need the following:

1. Admin form with the API key
2. A Drupal-based service that wraps/invokes the PHP SDK

damontgomery’s picture

StatusFileSize
new4.49 KB

This handles the very basic version of this module and is mostly copy & pasted from the digital_ocean sandbox module.

You can test this with,

drush ev '$manager = \Drupal::service("hubspot_api.manager"); $handler = $manager->getHandler(); print json_encode($handler->contacts()->all(["count" => 10,"property" => ["firstname", "lastname"]]));'
nerdstein’s picture

Status: Active » Needs work

That patch looks awesome on code review but it wont apply. Its probably some windows character encoding issues. Can I get a new patch?

damontgomery’s picture

StatusFileSize
new4.32 KB

Try this?

nerdstein’s picture

Status: Needs work » Fixed

This is good and initial testing works well. Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.