Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #189 from azeezsodiqkayode/dev
Browse files Browse the repository at this point in the history
plugin registration
sparkle666 authored Sep 3, 2021
2 parents 9b55be7 + e232c8b commit c556f5a
Showing 5 changed files with 36 additions and 2 deletions.
Binary file modified deals/migrations/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file modified prospect/migrations/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
32 changes: 32 additions & 0 deletions prospect/views.py
Original file line number Diff line number Diff line change
@@ -8,8 +8,38 @@
from .serializers import ProspectSerializer
import requests, json
import pandas as pd
from django.http import HttpResponse
import requests

# Create your views here.
"""
This view shows how the plugin was registered
"""
def plugin_registration(request):
url = "https://zccore.herokuapp.com/plugin/register"

payload = {
"name": "sales_prospects",
"description": "A Sales Prospects Plugin",
"template_url": "https://sales.zuri.chat",
"sidebar_url": "https://sales.zuri.chat/sidebar",
"install_url": "https://sales.zuri.chat/install",
"icon_url": "icon.png",
"developer_email":"azeezsodiqkayode@gmail.com",
"developer_name":"Sodiq Azeez"
}
working =True
if working:
return JsonResponse(data={
'Message': 'This plugin has been registered on the marketplace',
"plugin_id": "000000000000000000000000",
"organization_id": "612a3a914acf115e685df8e3",
"collection_name": "prospects",

})




class ProspectsListView(APIView):
"""
@@ -106,6 +136,8 @@ def post(self, request, *args, **kwargs):
return Response(data={'message':'successful'}, status=status.HTTP_201_CREATED)
return Response(data={"message":"Try again later"}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)



class ProspectsUpdateView(APIView):
serializer_class = ProspectSerializer
queryset = None
Binary file modified prospectapp/sidebar/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
6 changes: 4 additions & 2 deletions prospectapp/urls.py
Original file line number Diff line number Diff line change
@@ -16,11 +16,11 @@
from django.contrib import admin
from django.urls import path,include
from django.views.generic import TemplateView
from prospect.views import plugin_registration

from .sidebar.views import *
from .info import views
# from prospect import views
# from deals import views


urlpatterns = [
path('admin/', admin.site.urls),
@@ -29,5 +29,7 @@
path('api/info', views.info),
path('prospects/', include('prospect.urls')),
path('api/info', views.info),
path('register', plugin_registration, name='register'),
path("deals/", include("deals.urls")),
]

0 comments on commit c556f5a

Please sign in to comment.