Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 19 2017 07:15

    jy-binary on master

    create Makefile Merge pull request #7 from chyl… (compare)

  • May 19 2017 07:15
    jy-binary closed #7
  • May 19 2017 00:39
    codecov-io commented #7
  • May 19 2017 00:39
    codecov-io commented #7
  • May 19 2017 00:39
    codecov-io commented #7
  • May 19 2017 00:39
    codecov-io commented #7
  • May 19 2017 00:30
    chylli opened #7
  • Mar 03 2017 02:38

    jy-binary on master

    fix Changes problem Merge pull request #6 from chyl… (compare)

  • Mar 03 2017 02:38
    jy-binary closed #6
  • Mar 01 2017 04:01
    chylli opened #6
  • Feb 28 2017 07:10

    jy-binary on master

    switch to dzil switch to dzil remove useless file and 3 more (compare)

  • Feb 28 2017 07:10
    jy-binary closed #5
  • Feb 27 2017 09:47
    codecov-io commented #5
  • Feb 27 2017 09:47
    codecov-io commented #5
  • Feb 27 2017 09:47
    codecov-io commented #5
  • Feb 27 2017 09:37
    chylli synchronize #5
  • Feb 22 2017 00:35
    codecov-io commented #5
  • Feb 22 2017 00:34
    codecov-io commented #5
  • Feb 22 2017 00:29
    chylli synchronize #5
  • Feb 21 2017 10:38
    chylli synchronize #5
Fayland Lam
@fayland
but actually there are lots of more. it's still pretty incompleted.
the only stuff we didn't use but in the module is the products.
Frank Carnovale
@frank-binary
yeah; in fact the full "Edge" Management API is vast; it's almost unlimited how much of it we could wrap. My approach had been to just do the bare minimum to meet our requirements; i.e. register or update a single developer/appname pair.
You could argue, there's not much point enhancing the coverage until we get an enthusiastic fan-base out there in CPAN land.
Fayland Lam
@fayland
I see. I just added the needed one. and stopped on products
didn't plan to add all so far. but will add if we need that for sure.
I need go dinner for one hour. please leave your comments on the code here or github directly.
I'll reply once I see it, ty
Frank Carnovale
@frank-binary
So, if I get this right, you've pulled some of the logic back into register-api.cgi in order to make the calling program call Apigee services in a way that corresponds more closely to the core management api entry points.
ok sure will leave comments here.
Fayland Lam
@fayland
yes. the cpan is one call one sub
our login contains 3+ calls in one sub
if we need that sub in cpan, we need create a new sub update_or_create_developer_app
which is not so good
Frank Carnovale
@frank-binary
In fact I was going to suggest exactly that.. while the one call-one sub model is elegant, why not also include a couple of pragmatic helpers such as update_or_create_developer_app. When you think about it, that is wrapping some apigee-only logic which is unrelated to the caller's business problem, and lets your module say it's adding value to the interface not just mirroring it. Anyway my real reason for saying that is we do want to drastically cut down on our cgi code and it's very desirable to out-source that type of logic.
Fayland Lam
@fayland
but in our update app. we just update the DisplayName. which is not very generic as I see
Frank Carnovale
@frank-binary
I think callback_url is updateable too isn't it.. that's the one they will be always wanting to change.
Fayland Lam
@fayland
yes
but we can't directly put update DisplayName as the attributes for update_app in cpan
they may want to update others I think
but for create
a helper would be good to create developer if it's not created yet
I mean create_developer_app will create developer on the fly for a new sub
but naming is hard for this though
that once could be improved.
but update_app I think we can't put to cpan because it updates DisplayName attrs which is not very generic
Frank Carnovale
@frank-binary
Unfortunately the Edge API is quite messy in the specific area of Application displayname; I learnt after some painful tests that its internal JSON structure can represent it in different places. The original update code is messy because of how it tries to deal with this. In other words, the pure api call approach still leaves some awkward problems for the caller to deal with.
Fayland Lam
@fayland
you mean you can't update name directly with update_developer_app
I haven't tried that though
it's even worse for a sub to change name because we need put old_name new_new for update_or_create? which make no sense
Frank Carnovale
@frank-binary
let me look at your new code and I'll see if it will handle it right.. hang on.. (sorry go to your break if needed)
Fayland Lam
@fayland
np, the rice is just too hot and I'm waiting for it to be cooler
Frank Carnovale
@frank-binary
ha ha good.
I've just looked; in fact (case in point.. I now have to study new register-api.cgi also before I say whether I think it will work.. hang on..)
Frank Carnovale
@frank-binary
ok I see the code (the bit where someone has to set up an Attributes structure with DisplayName) I was looking for is now indeed on the cgi side; and I presume it does work. So, philosophical difference: purity vs. pragmatism. You've gone for elegant purity in exposing the API, but that has left the cgi caller to deal with some messy things about Apigee Edge. Arguably you could add some pragmatism.. hide that stuff into the cpan module too, so the caller doesn't even have to know about it.
Fayland Lam
@fayland
what do you think I create another module in this dist like Apigee::Edge::Helper or ::Simple
with the whole register logic inside etc.
Frank Carnovale
@frank-binary
yeah I was starting to think along same lines. Let the original maintain the 'pure' approach, and the 'helper' gives a dumb, easy, one-shot interface for the benefit of tiny clients like register-api.cgi.
A handy design goal would be that the new register-api.cgi should have at least same or fewer lines than before. Sounds crude but such is life.
Fayland Lam
@fayland
I do not think we will move validate part in the cpan module?
because the validation here is quite binary-specified
like length
anyway, I'll get a helper created and update the code
Frank Carnovale
@frank-binary
btw Fayland I've tested this in my dev environment. It did create a new developer/application pair at Apigee; but did not report results (including client id/client secret) back to the person registering. Also, coming in fresh to the page again, it did not report these details. Have a play with the current prod'n version to see required behavior.
sorry probs with Gitter, did not get some individual lines from your 2 most recent posts till now. v. strange.
Frank Carnovale
@frank-binary
re validation.. I can't recall any requirement by us to validate specially; it's a sanity check only.
Fayland Lam
@fayland
I added Apigee::Edge::Helper in the 0.03
and updated the register-api.cgi and tested in https://fayland.devbin.io/d/register-api.cgi
all passes. please take a look and let me know if any issue.
Frank Carnovale
@frank-binary
nice.
answered on email.